AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Improved way to run scripts from TextPad

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Apr 14, 2004 6:33 am    Post subject: Improved way to run scripts from TextPad Reply with quote

the original idea was from AU3's textpad notes which talk about "Setup an "Execute" tool in TextPad" and "Set Hotkey for the Execute tool ".

basically what it does is configure a hotkey in textpad that when pressed runs the currently loaded AU3 script. it really is a timesaver compared to going to the script's folder and running it from there every time u've made a change.

but the problem with this is that for every type of script (.ahk / .aut / .au3) one has to configure different script and hardcode the script running program's path. not my kind of way!

instead of that running this script will install a hotkey ctrl+1 in textpad that'll run any script that's currently loaded, be it .ahk / .aut / .au3 or even .bat or .cmd. the working is simple, it does "cmd.exe /c start %DosScriptPath%". (the hotkey can be reconfigured in textpad)


i've set it so that the dos window doesn't popup.

Chris this is a nice addition to the textpad script and i'd like to add it there. what say?
(u see i've already considered both OS types)

Code:
RegWrite, REG_BINARY, HKCU, Software\Helios\TextPad 4\Tools\0, Properties, 000000005680000046000000
RegWrite, REG_SZ, HKCU, Software\Helios\TextPad 4\Tools\0, MenuText, Run Script
RegWrite, REG_SZ, HKCU, Software\Helios\TextPad 4\Tools\0, Command, %comspec%
RegWrite, REG_SZ, HKCU, Software\Helios\TextPad 4\Tools\0, Parameters, %a_space%/c start $DosFile
RegWrite, REG_SZ, HKCU, Software\Helios\TextPad 4\Tools\0, Folder, $FileDir
RegWrite, REG_SZ, HKCU, Software\Helios\TextPad 4\Tools\0, RE,

_________________


Last edited by Rajat on Wed Apr 14, 2004 11:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Apr 14, 2004 12:47 pm    Post subject: Reply with quote

Yes, go ahead and send me the revised version so I can include it.

I've been using this same feature with Metapad for a while. It's built-in to that editor so all you do is press Ctrl-D to "launch" the current document.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Apr 14, 2004 3:09 pm    Post subject: Reply with quote

Metapad rocks!! Sadly I decided to move to a more enhanced Text editor (PSPad) to be able to have multiple files open at the same time. But it has still replaced my notepad.exe on all 1400 PC's I work on.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Apr 14, 2004 11:07 pm    Post subject: Reply with quote

fixed a li'l bug that caused the script to work in select conditions only...
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group