Jump to content

Write the whole variable


Guest Rewad
 Share

Recommended Posts

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

Link to comment
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
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...