Quote:
error on line 137
Line 137 in Radial menu v3.17.ahk is:
Code:
Run, RMSoundOnShow.ahk, %A_ScriptDir%\RMdata\SoundPlayers
It is impossible that Radial menu v3.17.ahk can't run this script because it is in %A_ScriptDir%\RMdata\SoundPlayers and its name is RMSoundOnShow.ahk!
Radial menu v3.16.rar does not have RMSoundOnShow.ahk in %A_ScriptDir%\RMdata\SoundPlayers, like Radial menu v3.17.rar!
You can't just replace old Radial menu v3.17.ahk or Radial menu v3.16.ahk with updated Radial menu v3.17.ahk. You must replace whole package!
That's the reason why I'm uploading whole RM Package.
Quote:
Works perfect except if i pass in command line arguments to the executable then it fails the "ends with .exe" check and runs from ahk directory.
Ok, I created
new system of running RM items.
This system (tested on my comp on Win XP):
- launches
almost everything from target's home folder
- supports parameters
- supports system verbs
- supports CLSID folders
- supports built-in variables important for Run command; %A_ProgramFiles% %A_Scriptdir% %A_WinDir% etc...
I want you and everybody else to
test script below
and report does it work. Imagine that text you entered is Item's action, (but don't enter
MySub).
If this ImprovedRun system works, I'll implement it in RM. It works perfectly on my comp...
Remember that Item's action is Run command's first parameter - target
If you want to execute Run command with more parameters like Max|Min|Hide|UseErrorLevel, OutputVarPID, use MySub and create custom subroutine.
EDIT: script below updated - 21.2.2010. Developed to add more flexibility when running files with RM
Code:
ImprovedRun(FullPath) ; by Learning one v1.2
{
While (SubStr(FullPath,1,1) = A_Tab or SubStr(FullPath,1,1) = A_Space)
StringTrimLeft, FullPath, FullPath, 1
Transform, FullPath, Deref, %FullPath% ; suggestion by Maxmax14 (Thanks!)
if (RegExMatch(FullPath, "i)^(properties|find|explore|edit|open|print)\s*([a-z]{1}:\\|::\{)", SysVerb) = 1) ; with SysVerb
{
StringReplace, SysVerb, SysVerb, %A_Space%, , all
StringTrimRight, SysVerb, SysVerb, 3
SysVerbLength := StrLen(SysVerb)
StringTrimLeft, FullPath, FullPath, SysVerbLength+1
While (SubStr(FullPath,1,1) = A_Space)
StringTrimLeft, FullPath, FullPath, 1
if (SubStr(FullPath, 1, 3) = "::{") ; CLSID folders
{
Run, %SysVerb% %FullPath%
Return
}
SplitPath, FullPath, file, dir
While (SubStr(file,0,1) = A_Space)
StringTrimRight, file, file, 1
if file =
{
Run, %SysVerb%, %dir%
Return
}
FileWithSysVerb := SysVerb A_Space file
Run, %FileWithSysVerb%, %dir%
Return
}
Else ; without SysVerb
{
if (SubStr(FullPath, 1, 3) = "::{") ; CLSID folders
{
Run, %FullPath%
Return
}
if FullPath contains "
{
Run, %FullPath%
Return
}
SplitPath, FullPath, file, dir
While (SubStr(file,1,1) = A_Space)
StringTrimLeft, file, file, 1
While (SubStr(dir,1,1) = A_Space)
StringTrimLeft, dir, dir, 1
if file =
{
Run, %dir%
Return
}
if dir =
{
Run, %file%
Return
}
Run, %file%, %dir%
Return
}
}
Gui, +AlwaysOnTop
Gui, Add, Edit, x6 y10 w460 h20 vAction,
Gui, Add, Button, x6 y40 w100 h30 Default , Run
Gui, Add, Button, x366 y40 w100 h30 , Close
Gui, Show, w477 h81, Test: ImprovedRun for Radial menu - by Learning one
Return
ButtonClose:
GuiClose:
ExitApp
ButtonRun:
Gui, submit, nohide
ImprovedRun(Action)
Return
Escape::ExitApp
Some
examples that work perfectly on my comp:
C:\
explore C:\
%A_ScriptDir%\Utilities\Hibernate.ahk
%A_WinDir%\explorer.exe
explore ::{645ff040-5081-101b-9f08-00aa002f954e}
properties C:\My Programs\Freeciv\civclient.exe
C:\My Programs\Freeciv\civclient.exe
::{645ff040-5081-101b-9f08-00aa002f954e}
C:\test.txt
C:\My Programs\CCleaner\CCleaner.exe
C:\My Programs\CCleaner\CCleaner.exe /AUTO
properties C:\My Programs\CCleaner\CCleaner.exe
inetcpl.cpl
%A_ProgramFiles%\Windows Media Player\wmplayer.exe "C:\Song1.mp3" "C:\Song2.mp3" "C:\Song3.mp3" "C:\Song4.mp3"
notepad "%A_ScriptDir%\Utilities\Hibernate.ahk"