Sign in to follow this  
Followers 0
Guest Rewad

Write the whole variable

3 posts in this topic

Tach

I've got a little problem with my code, it's a simpel problem but i don't now ho to fix it.

I want do count some operations, so I wrote a code like this:

AutoItSetOption ( "SendKeyDelay", 25 )
HotKeySet("{ESC}", "End")

Run("Notepad.exe", "", @SW_MAXIMIZE)
WinWait("Unbenannt - Editor")
WinActivate("Unbenannt - Editor")

$timer = 1

While 1
  Send( "{"&$timer&"}{ENTER}" )
  $timer = ($timer+1)
  Sleep(500)
WEnd

Func End()
  Exit
EndFunc

He counts to 9 after that he write only the first number of the variable $timer.

But he must wrote the whole number, how can I do that?

I hope you understand my simple english :lmao:

Thanks for any help

Share this post


Link to post
Share on other sites



I tested it like this and it worked here.

AutoItSetOption ( "SendKeyDelay", 25 )
HotKeySet("{ESC}", "End")

;Run("Notepad.exe", "", @SW_MAXIMIZE)
;WinWait("Unbenannt - Editor")
;WinActivate("Unbenannt - Editor")

$timer = 1

While 1
  Send($timer & "{ENTER}")
  $timer = ($timer+1)
  Sleep(500)
WEnd

Func End()
  Exit
EndFunc

Share this post


Link to post
Share on other sites

yea :lmao:

Thanks for the fast help, it's works great.

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