 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Fri Feb 19, 2010 10:00 am Post subject: |
|
|
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. _________________
 |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Mar 03, 2010 10:56 pm Post subject: |
|
|
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". |
|
| Back to top |
|
 |
renamer Guest
|
Posted: Thu Mar 11, 2010 4:21 pm Post subject: |
|
|
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! |
|
| Back to top |
|
 |
Guest2019 Guest
|
Posted: Sun Mar 21, 2010 5:35 pm Post subject: |
|
|
Just FYI, I reported this problem
After I reinstalled Windows 7 everything works perfect now!
Thanks! |
|
| Back to top |
|
 |
majkinetor ! Guest
|
Posted: Mon Mar 22, 2010 1:09 am Post subject: |
|
|
| Disable the DEP protection on AHK (or MRS.exe in this case). |
|
| Back to top |
|
 |
guest3456 Guest
|
Posted: Thu Mar 25, 2010 1:34 am Post subject: Re: Multi-Rename Script v1.5c (Unicode) |
|
|
| 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? |
|
| Back to top |
|
 |
lexikos* Guest
|
Posted: Thu Mar 25, 2010 2:46 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Thu Mar 25, 2010 8:29 am Post subject: |
|
|
| 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. _________________
 |
|
| Back to top |
|
 |
St Guest
|
Posted: Sun Apr 04, 2010 11:41 am Post subject: |
|
|
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. |
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Apr 21, 2010 2:26 pm Post subject: |
|
|
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" _________________
 |
|
| Back to top |
|
 |
emmanuel d
Joined: 29 Jan 2009 Posts: 436 Location: Belgium
|
Posted: Thu Apr 22, 2010 3:04 pm Post subject: |
|
|
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
http://www.autohotkey.com/forum/viewtopic.php?p=306819
the code i post falls under the:
WTFYW license
, wich meens its free to use |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Thu Apr 22, 2010 3:31 pm Post subject: |
|
|
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. _________________
 |
|
| Back to top |
|
 |
emmanuel d
Joined: 29 Jan 2009 Posts: 436 Location: Belgium
|
Posted: Thu Apr 22, 2010 5:11 pm Post subject: |
|
|
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
http://www.autohotkey.com/forum/viewtopic.php?p=306819
the code i post falls under the:
WTFYW license
, wich meens its free to use |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 213 Location: Greece/Rhodos
|
Posted: Thu Jul 08, 2010 9:01 am Post subject: |
|
|
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  _________________ Popcorn Movie Db
Simple Apnea Trainer |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Thu Jul 08, 2010 9:17 am Post subject: |
|
|
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. _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|