AutoHotkey Community

It is currently May 27th, 2012, 4:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 92 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: February 19th, 2010, 11:00 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
v1.5c 19/02/2010
    ! Fixed issue with content plugins that have - in the name (i.e. jpg-comment.wdx)
    + Optimization: Improved speed of editor preview a lot.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 3rd, 2010, 11:56 pm 
Just FYI

I tried this on Windows 7, but when I start mrs.exe I get the following error message:

"AutoHotkey_L has stopped working".


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 11th, 2010, 5:21 pm 
Hi all,

I know this is freeware, but still - some kind of answer would be great :-)

In any case, thank you very much spending the time creating this!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2010, 6:35 pm 
Just FYI, I reported this problem

After I reinstalled Windows 7 everything works perfect now!

Thanks!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 22nd, 2010, 2:09 am 
Disable the DEP protection on AHK (or MRS.exe in this case).


Report this post
Top
  
Reply with quote  
PostPosted: March 25th, 2010, 2:34 am 
majkinetor wrote:
* You don't need AHK anymore to run MRS. AHKL is included in the archive, renamed to MRS.exe so you don't have to install it. MRS.ahk itself is renamed to AutoHotKey.ini.


how does this work? does it work for normal AHK build as well? sounds like the normal Autohotkey.exe first searches for any code in Autohotkey.ini in the same directory before any script thats passed to it? is this documented anywhere?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2010, 3:46 am 
Currently the default script location is %A_MyDocuments%\AutoHotkey.ahk, but it used to be %A_WorkingDir%\AutoHotkey.ini. This is still supported for backward-compatibility, and it's useful for portability (as demonstrated by MRS). AutoHotkey_L does the same, but I plan to change it to use <name of exe>.ini or perhaps <name of exe>.ahk, since it really is an AutoHotkey script not a traditional config file. In other words, majkinetor will be able to change the files to MRS.exe and MRS.ahk, and AutoHotkey_L users can run MRS.ahk directly.
guest3456 wrote:
is this documented anywhere?
Here, see Script Filename.
majkinetor wrote:
Disable the DEP protection on AHK (or MRS.exe in this case).
I assume you're using callbacks? You should be able to make each callback read-execute by dll-calling VirtualProtect - it'll affect all other dynamic allocations in the same page of virtual memory, but at least the users won't (at least shouldn't) need to disable DEP.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2010, 9:29 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Lexikos wrote:
I assume you're using callbacks? You should be able to make each callback read-execute by dll-calling VirtualProtect

Yes, I have callbacks. Thx for notifying me about way to fix this.

Lexikos wrote:
<name of exe>.ahk

Looking forward to this.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 4th, 2010, 12:41 pm 
He, thanks majkinetor ! great work.

May i suggest to change the instruction in "Plugins.html"
from "rename"
Quote:
For the start go to \plugins folder, and rename MyPlugin file to Size.ahk and open it in editor.


to "copy"
Quote:
For the start go to \plugins folder, and COPY MyPlugin file to Size.ahk and open it in editor.


?

Or better:
Quote:
For the start go to \plugins folder, and create an copy of MyPlugin file as Size.ahk and open it in editor.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 21st, 2010, 3:26 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
2 St
OK, I will. Thx.

2 all
Dots in a file names are troubling.
I'll share regular expression that removes dots from the file names.
Consider the following files:
Code:
DIR:  Chemical.Computing.v1.0.2009.10.a.Multiplatform
FILE: Non-viral.Gene.Therapy.Gene.Design.and.Delivery.by.Kazunari.Taira.v1.0.pdf

You want to replace dots with spaces but not from version and extension on files. Also, directories don't use extension so you want to remove it there too. The output should be as follows:

Code:
DIR:  Chemical Computing v1.0.2009.10.a Multiplatform
FILE: Non-viral Gene Therapy Gene Design and Delivery by Kazunari Taira.pdf


To setup this in MRS do the following:
    1. Press F12 to load default preset.

    2. Edit Search & Replace part and set:
    Serach: i)([a-z])\.([a-z])(?![^.]{0,3}$)
    Replace: $1 $2

    3. Expand the interface and save this preset as "Remove Dots".

    4. If you are Total Commander user you can add the following in the Start Menu to be able to rename files without starting MRS GUI.
    Title: Remove Dots
    Command: <path>\MRS.ahkl
    Parameters: %UL ">Remove Dots"

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2010, 4:04 pm 
Offline

Joined: January 29th, 2009, 9:50 pm
Posts: 483
Location: Belgium
i think its a bug in ahk that when you have a folder with dots it has a extention.
i fix it like this:
Code:
      SplitPath,A_LoopFileLongPath, FileExt,Dir,Ext,File
      InStr(A_LoopFileAttrib,"D") ? (File:=FileExt, Ext:="")   ; If it is a dir, Fix directory extention bugg include the extention in the Name and delete the extention
this way, when it is a folder there will never be a fileextention
like in this renamer(no gui): http://www.autohotkey.com/forum/viewtopic.php?p=349898#349898

_________________
Stopwatch emdkplayer
the code i post falls under the: WTFYW-WTFPL license


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2010, 4:31 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
I will consider adding this as an option in future versions. Its not ahk bug tho. Folders can have extensions (they are files too). This is easy to check:

Make folder: Blah.www
In console: dir /OE

This will sort file list using extension and u will see that Blah.www was listed using extension.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2010, 6:11 pm 
Offline

Joined: January 29th, 2009, 9:50 pm
Posts: 483
Location: Belgium
true it is not a ahk bug, its a windows bug back from the DOS days mwahahaha

still windows doesnt act as a extention, like a folder called test.txt will never try to open with notepad because it uses filectention Folder or Directory from the registry.
on the other hand if u add a clsid extention to a folder in XP prior SP3 it would act ass defined in the clsid(now you need to edit desktop.ini)

but for whatever fileaction im gonna do in ahk i remove the extention in the folder var and i usualy add the dot in the extention, that saves my a lot of lines if else becouse %file%%ext% is always correct

_________________
Stopwatch emdkplayer
the code i post falls under the: WTFYW-WTFPL license


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2010, 10:01 am 
Offline
User avatar

Joined: July 17th, 2008, 12:58 am
Posts: 270
i just needed this script again to rename some mp3 files and i was wondering if its possible to get a randomize option. because i dont want to hear 3 songs from the same artist in a row so if there could be a random counter or something it would be great.

thanks for your great work :)

_________________
QuickSubs | Popcorn Movie Db
All my scripts are just in AutoHotkey v1.0.48.05


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2010, 10:17 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Are you sure you want to treat your mp3 like that ? There is shuffle option in every player around.

In case your situation is exotic, you can quickly make plugin that makes random name. I was free to make one for you:

Random.ahk
Code:
;   Globals
;   ------------------------------------
;   #Res    - result
;
;   #fn     - file name without extension
;   #fp     - file path
;   #fe     - file extension
;   #fd       - file directory
;   #no     - file number in the list
;   #flag   - prev|real
;
;   #1       - field or param1 if GetFields returns *
;   #2       - unit or param2 if GetFields returns *
;   #3      - contains entire user string, if GetFields returns *
;
;   #tmp    - temporary placeholder (you can also use any of the above unused globals)
;======================================================================================

Random:   
   ifEqual, #1, , SetEnv, #1, 3
   ifEqual, #2, , SetEnv, #2, 10
   #Res := RandomVar(#1, #2, "alpha")
return

RandomVar(p_MinLength,p_MaxLength,p_Type="",p_MinAsc=32,p_MaxAsc=126)
{
  StringReplace,p_Type,p_Type,!,,All
  l_Neg := !ErrorLevel
  StringReplace,p_Type,p_Type,#,@,All
  l_Cse := !ErrorLevel
  StringReplace,p_Type,p_Type,@,,All
  l_Rep := !ErrorLevel

  Random, l_Aux, %p_MinLength%, %p_MaxLength%
  Loop, %l_Aux%
  {
    Loop
    {
      Random, l_Aux, %p_MinAsc%, %p_MaxAsc%
      l_Aux := Chr(l_Aux)
      If ( !l_Rep ) OR ( l_Rep AND !InStr(l_Output,l_Aux,l_Cse) )
      {
        If p_Type not in integer,number,digit,xdigit,alpha,upper,lower,alnum,space
          break
        Else
          If l_Neg
          {
            If l_Aux is not %p_Type%
              break
          }
          Else
            If l_Aux is %p_Type%
              break
      }
    }
    l_Output .= l_Aux
  }
  return l_Output

}


You can use it as [=Random] or [=Random.Min.Max] ([=Random.1.5] will make file names from length 1 to max lenght 5 chars). I used RandomVar function from here.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 92 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group