Am I only allowed to get one line? I place the rget command under the waitfor command and nothing happened. plus I'm not sure how I get that data into the actual email? Sorry but I am lost here. I read help on the rget command but still don't understand how to get more information, where it is stored, and how to get that information into the email I have sending out. ??
Here is what I have now with these errors...
Error C102: Missing operand
Error C163: Invalid string variable
proc Monitor
while 1
waitfor "op:clk" forever matchcase
rget RAW
call Outlook
endwhile
endproc
proc Outlook
integer iTask, iWindow, iStatus = 0
string sTaskName
if firsttask iTask ;Search list of tasks for outlook.exe
taskname iTask sTaskName
if strnicmp sTaskName "outlook.exe" 11 ;Search for Outlook process
taskwin iTask iWindow
winactivate iWindow ;Bring Outlook to foreground
pause 2
launch_message() ;Run procedure to open new message
iStatus = 1 ;Set flag indicating Outlook was found
endif
while nexttask iTask
taskname iTask sTaskName
if strnicmp sTaskName "outlook.exe" 11
taskwin iTask iWindow
winactivate iWindow
pause 2
launch_message()
iStatus = 1
endif
endwhile
endif
if iStatus == 0 ;Outlook not active
run "c:\program files\microsoft office\office11\outlook.exe" maximized
pause 5
launch_message()
endif
endproc
proc launch_message
pause 3
sendkey CTRL 'N' ;Open new message
pause 1
sendkeystr "G., Kenneth;W, William E."
pause 1
sendkey ALT 'J' ;Move to subject line
pause 1
sendkeystr "Critical PITB 5ESS Alarm - Automated"
sendkey 0x09
sendkeystr "A Critical alarm has been detected. This is an automated email for the Pittsburgh 5ESS."
sendkey ALT 'S'
endproc