Jump to content
Sign in to follow this  
Unc3nZureD

Strange error

Recommended Posts

Unc3nZureD

I tried to make a VERY VERY simple script to let me make my life easier. But when I tried to modify I got an error:

So this code works:

HotKeySet("{ESC}", "Terminate")
HotKeySet("{SPACE}", "_Jump")

While 1
   Sleep(100)
WEnd

Func Terminate()
   Exit 0
EndFunc

Func _Jump()
   Send("{SHIFTDOWN}")
   Sleep(100)
   Send("{SPACE DOWN}")
   Sleep(900)
   Send("{SHIFTUP}")
   Send("{SPACE UP}")
EndFunc

But For example if I make a hotkey with the LCTRL it won't work.

HotKeySet("{ESC}", "Terminate")
HotKeySet("{LCTRL}", "_Jump")

While 1
   Sleep(100)
WEnd

Func Terminate()
   Exit 0
EndFunc

Func _Jump()
   Send("{SHIFTDOWN}")
   Sleep(100)
   Send("{SPACE DOWN}")
   Sleep(900)
   Send("{SHIFTUP}")
   Send("{SPACE UP}")
EndFunc

I can't understand what's wrong with my second source...

Edited by Unc3nZureD

Share this post


Link to post
Share on other sites
Unc3nZureD

Check the helpfile, in particular this section: The following hotkeys cannot be set

Oh lol, I forgot it :mellow:

Share this post


Link to post
Share on other sites
PowerCat

Also check the website rules about game automation.

Share this post


Link to post
Share on other sites
Jos

Also check the website rules about game automation.

We all know what it is likely used for and I am sure the OP is aware of the rules here, but we are not going to have a crusade like they did in the time of the Spanish inquisition. That would mean we would have to start drowning people and see if they float or sink.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
PowerCat

We all know what it is likely used for and I am sure the OP is aware of the rules here, but we are not going to have a crusade like they did in the time of the Spanish inquisition. That would mean we would have to start drowning people and see if they float or sink.

Jos

He turned me into a newt!

Share this post


Link to post
Share on other sites
Dana

He turned me into a newt!

But you got better?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.