PDA

View Full Version : LUA - send one command n times



Mastiff
January 31st, 2005, 09:47 AM
For a script I need to send a command the number of times that is defined in a variable. The command is easy:

WindowHandle = FindWindow ("MJFrame",nil)
result = PostMessage ( WindowHandle, 33768, 10008, 16777216)


The first part doesn't have to be repeated, though. The variable WindowHandle won't change, so it's only the second line I need.

Promixis
January 31st, 2005, 10:20 AM
for x = 1,n do
postmessage....
end

Mastiff
January 31st, 2005, 11:08 AM
Thanks, Mike! :D