Sign in to follow this  
Followers 0
SirJohann

¿Bug? - not really

3 posts in this topic

#1 ·  Posted (edited)

Hi guys, I was writing this simple code and I found that some weird happens. Please, ignore the code, I was just joking with friends.

ToolTip('Press space to start the wiggle <3' & @CRLF & _
        'Press escape to stop the wiggle :(', 0, 0, 'WIGGLE WIGGLE WIGGLE', 0, 100)

HotKeySet('{SPACE}', '_WiggleWiggleWiggle')
HotKeySet('{ESC}', '_DontWiggleWiggleWiggle')

Global $Wiggle = 0
Global $WiggleWiggle = ''

Sleep(4000)

While True
    Sleep(100)
WEnd

Func _WiggleWiggleWiggle()
    ToolTip('')
    While True
        For $Wiggle = 1 To Random(1, 5, 1)
            $WiggleWiggle &= 'WIGGLE '
        Next
        Send($WiggleWiggle)
        Send('{ENTER}')
        $WiggleWiggle = ''
        Sleep(300)
        MsgBox(64, 'Title', $WiggleWiggle)
    WEnd
EndFunc

Func _DontWiggleWiggleWiggle()
    Exit
EndFunc
The bug is in the first function, and the cause is the space next to 'WIGGLE', If I write the space, the msgbox and the rest of the function is not called, and without the space it is. I really can't undestand why. Edited by Melba23
Amended title

Codes codes codes.

Share this post


Link to post
Share on other sites



You need to stop the HotKey for space or else you fire the func each time to send a space.

Add this to the top of the first func:

HotKeySet('{SPACE}')

Jos


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Oh, thanks :)

Edited by SirJohann

Codes codes codes.

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