Yes, easy enough, just get the use code for whatever action you want, and put it in a loop (adding a few more lines for error checking and things). However, that would work fine for solo actions but unless there is more data you can add to the use code, I am not sure how to tell it to target a specific avatar or another avatar in general.
Anyway, here is code that will repeatedly use a solo action:
#include <File.au3>
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)
Opt("TrayIconHide", 0)
;create the tray menu items
TrayCreateItem("Start Action (F1)")
TrayItemSetOnEvent(-1, "Start")
TrayCreateItem("Stop Action (F2)")
TrayItemSetOnEvent(-1, "Stop")
TrayCreateItem("Set Sleep Interval (F3)")
TrayItemSetOnEvent(-1, "Interval")
TrayCreateItem("Pause Action (F2)")
TrayItemSetOnEvent(-1, "Pause")
TrayCreateItem("Exit (Escape)")
TrayItemSetOnEvent(-1, "Terminate")
;Set global variables
Global $Paused = False
Global $sleep = 0
Global $stop = False
;Set the hotkeys
HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{F3}", "Interval")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
while 1
sleep(100)
wend
Func Start()
If ProcessExists("IMVUClient.exe") OR ("IMVUQualityAgent.exe") Then
Opt("WinTitleMatchMode", 4)
;Get the Window Handle for IMVU
$hICWindow = WinGetHandle("[CLASS:ImvuNativeWindow]")
;Bring IMVU to the front so we don't accidently type into something else
WinActivate($hICWindow)
WinWait($hICWindow)
If $stop = True Then
$stop = False
EndIf
while $paused = False AND $stop = False
If $paused = True Then
;Pause the script for 24 days
sleep(2147483647)
EndIf
;Type the action code
Send("*use 2080")
;Hit enter to submit it
Send("{ENTER}")
;Pause for x amount of seconds
Sleep($sleep)
wend
EndIf
EndFunc
Func Stop()
If $stop = False Then
$stop = True
EndIF
EndFunc
Func Interval()
;Create a dialog box for sleep time input
$sleep = InputBox("Capture Interval", "Please Type In The Amount Of Time To Wait Inbetween Taking Pictures")
$sleep = $sleep * 1000
EndFunc
Func TogglePause()
If $Paused = True Then
$Paused = False
TrayTip("Resumed", "Script Resumed", 5)
Else
$Paused = True
TrayTip("Paused", "Script Paused", 5)
Endif
While $Paused = True
Sleep(100)
WEnd
EndFunc
Func Terminate()
Exit 0
EndFunc
Like I said, the above script only works for solo actions on your own avatar. It is an edited version of my picture taking macro script.
Just click on the room you want to run the macro in and use the following 5 hotkeys:
F1- Start script
F2- Stop script
F3 - Set sleep interval
Pause - Pause the script
Escape - Close script
All of these options can be access from the tray icon if for some reason you are running the script without a keyboard.
Now, I know this isn't exactly what you wanted but it is all I know how to do till we figure out how to tell it to interact with another avatar. This also helps us get a start on it and shows that Autoit is capable of interacting in the client.