Sign in to follow this  
Followers 0
autoitnerd

Another Help Topic: How To Make Compiled Script Run As A Service

28 posts in this topic

#1 ·  Posted (edited)

can anyone help mi with this? i was trying to do a hotkey combo Home+End+PageUp+PageDown+Pause , i did it this way HotKeySet("{Home}{End}{PgUp}{PgDn}{Pause}","EXITSCRIPT") but the script exits once i pressed one of any of the buttons.... how do u make it so that the script will only exit when all of the buttons are pressed?

Add On TO New Topic: ok i am wondering whether if i can make a script run as a windows service... i mean in the task manager u can see that the script's .exe file is run by local service and not by ur own name.... is there any way?

Edited by autoitnerd

Share this post


Link to post
Share on other sites



$hotkey = "{Home}{End}{PgUp}{PgDn}{Pause}"

HotKeySet($hotkey, "exitscript")

Func exitscript()
exit
endfunc

how bout this one??

Share this post


Link to post
Share on other sites

nope, it's no use, once i pressed home button the script ends... but thanks anyway, any one else can help mi?

Share this post


Link to post
Share on other sites

$hotkey = "{Home} + {End} + {PgUp} + {PgDn} + {Pause}"

HotKeySet($hotkey, "exitscript")

Func exitscript()
exit
endfunc

Should be it.

Share this post


Link to post
Share on other sites

nope not this either... thanks though.. anyone else? :D

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You can not use hotkeyset like that unless you use the !#^ characters but this should help:

#Include <Misc.au3>

while 1

if _IsPressed(21) and _IsPressed(22) and _IsPressed(24) and _IsPressed(23) then MsgBox(0,"","")

sleep(100)

WEnd

I took the pause out....

Edited by flip209

" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

The following hotkeys cannot be set:

any combos of two or more "base keys" such as '{F1}{F2}', and any keys of the form '{LALT}' or '{ALTDOWN}'.

I believe those are base keys but i'm not totally sure.

Edit- Yeah Flip got it posted at same time

Edited by Muchuchu

Share this post


Link to post
Share on other sites

It happens to me all the time, but you know I just have to put my two cents in...


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

oh ok so you can't set them to those keys eh? thanks a lot :D so can u tell mi where cna u find the list of modifier hotkeys? i mean control+alt+something else...

Share this post


Link to post
Share on other sites

You can use those key just not all at the same time. Well at least not that I have seen yet. Also, The ^+!# are defined in the help file...


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

ok thanks a lot for ur help!! :D

Share this post


Link to post
Share on other sites

You can use your key if you use the _ispressed function, like I posted above...


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

but if u use the if function without if not function then the script will take up 50% of the computer usage... anyway to prevent this?

Share this post


Link to post
Share on other sites

Can you post the function?


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

for example i use a script like this:

While 1

If ProcessExists("notepad.exe") Then

ProcessClose("notepad.exe")

EndIf

WEnd

it will take up 50% of my computer usage... how do u solve this?

Share this post


Link to post
Share on other sites

just this..

While 1
sleep(100)
ProcessClose("notepad.exe")
WEnd

Share this post


Link to post
Share on other sites

oh ok thanks a lot! :D i dun wan to spam lots of threads so i will jsut ask some more questions in this thread... how do u check the string that is entered? for example i wnana set the password function, and i use this: If $password = "pass" Then ...

but it turned out that if i type it in big casing it also recgonise it as the correct password... how do u solve this then?

Share this post


Link to post
Share on other sites

MsgBox(0, '"HI" = "hi"', "HI" = "hi")
MsgBox(0, '"HI" == "hi"', "HI" == "hi")


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

oh i got ur idea thanks a lot! :D this is all for now i will post again if i got anymore problems...

Share this post


Link to post
Share on other sites

please help mi out for the problem as described...

Share this post


Link to post
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
Sign in to follow this  
Followers 0