Jump to content

help with shortcuts


seres
 Share

Recommended Posts

hello how do i make shortcuts for functions so i dont have to be writing them all over again

like run(somthing)

You would define the function and its tasks:

Func DoStuff()
 ;doing something here
 ;doing more stuff
 ;doing one last thing
EndFuncoÝ÷ ٩ݶ§Ê·õ×[ajÛ¶íjÉ,|¨º»®*mo'X§Ø^~éܶ*'jëh×6MsgBox(0,"","My function;s about to perform")
DoStuff()
MsgBox(0,"","My function's done!")

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

HELLO what i mean is to put a command to a single letter

here is my code

HotKeySet("^+!a", "runall")

HotKeySet("^+!b", "runone")

While 1

Sleep(100)

WEnd

Func runall

Run("new.exe") ;i want to assing this run("new.exe") to somthing more simple like "c=run("new.exe")" so i write c in the other func and it runs it

EndFunc

and how do i add something to stop the autoit scrip cause when im in a game it wont stop with ctrl breake

Func runone

c

EndFunc

Edited by seres
Link to comment
Share on other sites

I don't think you can assign a statement to a single letter. Would you settle for a letter and two parentheses?

To stop your script with Ctrl-Break set Ctrl-Break as a hotkey to an exit function.

HotKeySet("^+!a", "runall")
HotKeySet("^+!b", "runone")
HotKeySet("^{BREAK}","depart")  ;to stop the script

While 1
Sleep(100)
WEnd

Func c()
    Run("new.exe")
EndFunc

Func runall ()
c()
EndFunc

Func runone()
c()
EndFunc

Func Depart()
    Exit
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...