Jump to content

Uhmm... WTF


AlmarM
 Share

Recommended Posts

Can someone pls help me???

My script opens notepad sends space (It need to be like that way)

Then i press pause so the script need to pause... It will pause BUT it wont show Script paused at 0, 0

Then when the pause it over (DONT need to be...) afther 4 sec... It will say Script Paused..

What I want is:

1.) Script need to say Script paused at 0, 0

2.) That it wont stop the pause afther the Sleep(4000)

3.) That i can pause and unpause it

Whats wrong?:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.6.0
 Author:         AlmarM

 Script Function:
    AutoIT v3 Script

 Extra information:
    AutoIT v3 Script
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)

Run("notepad.exe") 
WinWait("Naamloos - Kladblok","");Waits for Naamloos - Kladblok
If Not WinActive("Naamloos - Kladblok","") Then WinActivate("Naamloos - Kladblok","");If Naamloos - Kladblok is not active, it will make it active
WinWaitActive("Naamloos - Kladblok","");Waits untill Naamloos - Kladblok is active

HotKeySet('{ESC}', '_Exit');ESC to Exit (put any other key you want, but it need to be between the { and }
HotKeySet('{pause}', 'TogglePause');PAUSE to Pause and Unpause

Global $Paused = False

While 1

ControlSend("Naamloos - Kladblok","","","{space}");Sends the key space into Naamloos - Kladblok
Sleep(500);Time in Miliseconds (1000 = 1 Second)

Wend


Func TogglePause()
    $Paused = Not $Paused
     If $Paused Then
        Sleep(4000) 
        ToolTip('Script is "Paused"', 0, 0)
    Else
        ToolTip("")
    EndIf
EndFunc  ;==>TogglePause

Func _Exit()
;ToolTip(' '&@CRLF&' EXITING '&@CRLF&' ')
Sleep(500)
Exit
EndFunc

EDIT: If you wanne test the script notice the Naamloos - Kladblok

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

  • Developers

Stoere titel joh .... :)

Check the Helpfile example for HotKeySet() to find the answer on how to properly toggle ...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Stoere titel joh .... :)

Check the Helpfile example for HotKeySet() to find the answer on how to properly toggle ...

Yeah... But i think i didn't have the right order :S

Pls help me :)

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

What I want is:

1.) Script need to say Script paused at 0, 0

2.) That it wont stop the pause afther the Sleep(4000)

3.) That i can pause and unpause it

Whats wrong?:

For starters the subject of this thead...... hang on looking for the right workd..... no.... ok, your subject line .... STINKS!

And of course you're not READING the Help file.

AND you're not LISTENING to people who give you the answer as Jdeb has.

Before you start with the bs excuses of, "mi engelich no good" or "I'm only a kid" or "I'm a n00b", stop! Anyone can take two files and compare them visually to see the order or location or syntax of the working code verses the broken code. Come on man, you can do better than this. And if your doing your best, well your best isn't good enough.

Edited by ssubirias3
Link to comment
Share on other sites

  • Developers

Yeah... But i think i didn't have the right order :S

Pls help me :)

Don't try to be a smart ass and look at the TogglePause() func in the SetHotKey() example in the helpfile ...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

For starters the subject of this thead...... hang on looking for the right workd..... no.... ok, your subject line .... STINKS!

And of course you're not READING the Help file.

AND you're not LISTENING to people who give you the answer as Jdeb has.

Before you start with the bs excuses of, "mi engelich no good" or "I'm only a kid" or "I'm a n00b", stop! Anyone can take two files and compare them visually to see the order or location or syntax of the working code verses the broken code. Come on man, you can do better than this. And if your doing your best, well your best isn't good enough.

:) Doh! We created a monster! :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

For starters the subject of this thead...... hang on looking for the right workd..... no.... ok, your subject line .... STINKS!

And of course you're not READING the Help file.

AND you're not LISTENING to people who give you the answer as Jdeb has.

Before you start with the bs excuses of, "mi engelich no good" or "I'm only a kid" or "I'm a n00b", stop! Anyone can take two files and compare them visually to see the order or location or syntax of the working code verses the broken code. Come on man, you can do better than this. And if your doing your best, well your best isn't good enough.

Hmm... Well put. :)
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...