AutoHotkey Community

It is currently May 27th, 2012, 6:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: November 22nd, 2005, 3:01 pm 
Offline

Joined: November 4th, 2005, 9:24 am
Posts: 9
a small script which opens an edit window and executes the contents as ahk script. remembers the contents for the next activation. using a hotkey to launch the script lets you do virtually anything by just typing in the right commands.

christian

Code:
FileRead, COMMAND, %TEMP%\execute!.ahk
if ErrorLevel <> 0
   COMMAND=SoundPlay, %SystemRoot%\Media\ding.wav, wait

Gui, add, text,, Code to execute:
Gui, Add, Edit, r9 vMyEdit, %COMMAND%
Gui, add, button, default, &Execute  ; The label ButtonExecute (if it exists) will be run when the button is pressed.
Gui, add, button, X+15, &Cancel
Gui, show,, AutoHotkey Code Execution
return  ; End of auto-execute section. The script is idle until the user does something.

ButtonExecute:
Gui, submit  ; Save the input from the user to each control's associated variable.

FileDelete, %TEMP%\execute!.ahk
FileAppend, %MyEdit%, %TEMP%\execute!.ahk
Run, %TEMP%\execute!.ahk

GuiClose:
ButtonCancel:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2005, 12:23 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
So simple! Thanks for posting it. I just hid the buttons and added your script to my main one. Now, if I need to know how many days are between two dates, I just fire the GUI and type
Code:
d = 20050611
d-= 20041212,days
MsgBox % d


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, JamixZol, rbrtryn and 19 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