Sign in to follow this  
Followers 0
AlmarM

Uhmm... WTF

9 posts in this topic

#1 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites



Stoere titel joh .... :)

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


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

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites
:)

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.

Share this post


Link to post
Share on other sites

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 ...

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

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.

Share this post


Link to post
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. :)

Share this post


Link to post
Share on other sites

:) Doh! We created a monster! :)

It's OK if ssubirias3 bites a few... the vet says he's had his shots.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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