Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

how to run a file that isnt an .exe

Posted by chicken pie4 tea 
how to run a file that isnt an .exe
March 30, 2011 03:31PM
I wish to make a gesture that will open a file with the extension .ahk
this is an autohotkey script anyone know how to do that?
Leo
Re: how to run a file that isnt an .exe
March 30, 2011 04:08PM
Hello chicken pie4 tea

http://www.autohotkey.com/docs/Scripts.htm

Run - Program

File: autohotkey.exe

Arguments: Myscript.ahk


Thanks Leo
Re: how to run a file that isnt an .exe
March 31, 2011 03:39AM
I have tried several things but its not working

I tried putting the full path to autohotkey.exe so where it says File I put
C:\programs\autohotkey\autohotkey.exe

I then put the full path to the script I want to run (otherwise how would it know where the script was if I justt put examplescript.ahk in the arguments ans you suggested
so I put
D:\scripts\examplescript.ahk

this doesnt work
Re: how to run a file that isnt an .exe
March 31, 2011 03:47AM
This should work. You must be missing something. Post here the contents of the .cfg file containing the action, please.
Re: how to run a file that isnt an .exe
March 31, 2011 04:34AM
this is from my default .cfg

stop watch {
gesture = 2
New Command = exec, run "C:\\Program Files\\AutoHotkey\\AutoHotkey.exe" "" "D:\\PROGRAM FILES\\PORTABLE APPS IN HERE\\strokeit\\my ahk scripts\\STOPwatch.ahk" ""
}

I get the message "script file cannot be opened D:\\program files ....
Oh I've solved it, I had to put double quotes around the path to the script
"D:\Program files\etc\myscript.ahk"
not it works



Edited 2 time(s). Last edit at 03/31/2011 04:47AM by chicken pie4 tea.
Re: how to run a file that isnt an .exe
March 31, 2011 04:55AM
You're missing the quotation marks surrounding the Arguments. Since your path contains spaces you have to enclose it with double quotation marks (eg. "D:\PROGRAM FILES\PORTABLE APPS IN HERE\strokeit\my ahk scripts\STOPwatch.ahk"). They should be used with File too (there are spaces in the executable path as well) but for some reason StrokeIt does not require it. Perhaps it quotes it internally, which is something that cannot be done with the arguments.

EDIT: Do not mistake the ones in the .cfg file for the required ones, they are just grouping the strings for StrokeIt.



Edited 1 time(s). Last edit at 03/31/2011 04:56AM by gemisigo.
Author:

Your Email:


Subject:


Attachments:
  • Valid attachments: zip, sxp, cfg
  • No file can be larger than 128 KB
  • All files together cannot be larger than 512 KB
  • 4 more file(s) can be attached to this message

Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 6 plus 7?
Message: