Sign in to follow this  
Followers 0
Thrillski

Macro help

3 posts in this topic

Good morning!

Background: I have decided to write a program for my work-at-home wife to assist her in her job. Basically, she has to process batches of information and I would like to automate the more mundane aspects of that. I'd like to use hotkeys and macros as that would assist in the data entering process versus

mouse-clicking an auto-generated compiled autoscriptwriter script.

What I am learning now is how to do this in notepad first and then the real program, and 1 key, whereas hopefully this will have a dozen or so routines.

For some odd reason, this doesn't work. This one gives me...

Error at line 4. (while 1)

"Error: This line does not contain a recognized action." and exits.

I've tried it with for/next loops and dowhile with no success.

Thanks in advance and I hope I didn't ask too many stupid questions.

Have a nice day!

Thrillski

-------- Script Begins ----------

HotKeySet("{+}", "_251")

HotKeySet("{ESC}", "Terminate")

While 1

WinActivate("Untitled"); Using Notepad for test purposes. Will use real program later.

Wend

Func _251

Sleep, 100

Send, This is line 1

Sleep, 100

Send, This is line 2

Sleep, 100

Send, 249{ENTER}

EndFunc

Func Terminate()

Exit 0

EndFunc

------- Script Ends ----------------

Share this post


Link to post
Share on other sites



Good morning!

Background: I have decided to write a program for my work-at-home wife to assist her in her job. Basically, she has to process batches of information and I would like to automate the more mundane aspects of that. I'd like to use hotkeys and macros as that would assist in the data entering process versus

mouse-clicking an auto-generated compiled autoscriptwriter script.

What I am learning now is how to do this in notepad first and then the real program, and 1 key, whereas hopefully this will have a dozen or so routines.

For some odd reason, this doesn't work. This one gives me...

Error at line 4. (while 1)

"Error: This line does not contain a recognized action." and exits.

I've tried it with for/next loops and dowhile with no success.

Thanks in advance and I hope I didn't ask too many stupid questions.

Have a nice day!

Thrillski

-------- Script Begins ----------

HotKeySet("{+}", "_251")

HotKeySet("{ESC}", "Terminate")

While 1

WinActivate("Untitled"); Using Notepad for test purposes. Will use real program later.

Wend

Func _251

Sleep, 100

Send, This is line 1

Sleep, 100

Send, This is line 2

Sleep, 100

Send, 249{ENTER}

EndFunc

Func Terminate()

Exit 0

EndFunc

------- Script Ends ----------------

You are not using AU3check i assume :whistle:

The Func statement is missing () .

Should be: Func _251()

..and all lines in the Func _251 look to me as Version 2 syntax ...not version 3 ...

:lmao:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You are not using AU3check i assume :whistle:

The Func statement is missing () .

Should be: Func _251()

..and all lines in the Func _251 look to me as Version 2 syntax ...not version 3 ...

:lmao:

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