Jump to content

2 problems in 1 thread! :D


Recommended Posts

alrighty, i made something rather useful, a script that saves my work in flash every 10 minutes and presses f5 23 times to give me 23 more frames. behold, two rather silly problems:

1) hotkeyset("|", "stopscript") ;not L or i. shift \

works fine but

hotkeyset ("+", "twentyfour")

doesn't.

function twentyfour is right there V

func twentyfour()

while $c<24

send ("{F5}")

$c=$c+1

wend

endfunc

yes, i agree it might eat a little cpu for like a second, but it'll save me from counting exactly 23 frames.

2) the damn tooltip is stuck! :D

hotkeyset ("_", "test")

...

...

...

func test()

tooltip ("+ = +23f, _ = test, | = exit", 0, 0, "")

sleep (2000)

endfunc

i wait for two seconds, and it's not gone.

i see no reason for it to be not gone since it worked perfectly earlier o.o;

i just changed some text and it refuses to leave the screen.

:D

Link to comment
Share on other sites

func twentyfour()
For $c = 1 To 24
send ("{F5}")
ConsoleWrite($c&@CRLF)
Next
EndFunc

This worked fine for the twentyfour() function... just changed from a loop to a for next..

Not sure about the tooltip..

Kerros

Edit:

For the 24 function is it having a problem because the window is not active, or maybe not giving enough time for F5 to complete. Putting a sleep(10) may help after the send command. Just a thought.

Edited by Kerros

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

First things first... you have the tooltip thing a little wrong. The helpfile says the tooltip stays there until the script exits (not the function ends) or you call ToolTip(""). So to leave the tooltip for two seconds put ToolTip("") right after your sleep.

As for the function eating cpu, put a sleep(10) in your while loop. It will make a big difference.

EDIT: Ha good teamwork Kerros. GodForsakenSoul, does what we gave you solve your problems?

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
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...