Jump to content

Time out issues, possibly need new structure - taking suggestions


Recommended Posts

The setup: I have a harness script (first one below) that creates a GUI with numerous checkboxes of individual scripts I need to run to test some CBT software. I'll paste a sample of those individual scripts as well. I'm up to around 40 different scripts that this harness GUI runs. If there is a problem and one of them hangs up it stops the rest from running. I'm trying to do this at night saving man hours, thus the automation, but if it get hung up because of an error or something in the individual script it just sits there until a human intervenes in the morning. Do you guys (gals) have a suggestion for a better harness structure that would move on to the next script when it's been idle for, say, 30 minutes? I'm very much a newbie, as you can probably tell, but I've made it a long way teaching myself. I'd love to get this worked out. I apologize in advance if I'm posting improperly. I also thank you in advance for any suggestions you can make short of "give it up".

My harness script:

AutoItSetOption( "WinTitleMatchMode", 2) ;This option sets the title match mode. 2 - any part of string.

AutoItSetOption( "CaretCoordMode", 0) ;This option sets the caret coord mode to 0 - relative to active window.

#include <EditConstants.au3>

;--------------------------------------------------------------------------------

;hotkey exit mod

HotKeySet("^!x", "MyExit")

; Rest of Script

Func MyExit()

Exit

EndFunc

GUICreate('Aramark Content Testing Harness', 600, 650)

GUISetState()

;Guictrlcreatelabel( "English", 20, 10, 300, 20)

;Guictrlcreatelabel( "Spanish", 200, 10, 300, 20)

$cb1 = GUICtrlCreateCheckbox('s_a_UNM15_e_w.exe' ,20, 35, 250, 20)

$cb2 = GUICtrlCreateCheckbox('s_a_UNM15_e_x.exe' ,20, 55, 250, 20)

$cb3 = GUICtrlCreateCheckbox('s_a_UNM15_e_y.exe' ,20, 75, 250, 20)

$cb4 = GUICtrlCreateCheckbox('s_a_UNM15_e_z.exe' ,20, 95, 250, 20)

$cb5 = GUICtrlCreateCheckbox('s_a_UNM15_s_w.exe' ,20, 155, 250, 20)

$cb6 = GUICtrlCreateCheckbox('s_a_UNM15_s_x.exe' ,20, 175, 250, 20)

$cb7 = GUICtrlCreateCheckbox('s_a_UNM15_s_y.exe' ,20, 195, 250, 20)

$cb8 = GUICtrlCreateCheckbox('s_a_UNM15_s_z.exe' ,20, 215, 250, 20)

$cb9 = GUICtrlCreateCheckbox('blank for future use' ,20, 280, 250, 20)

$cb10 = GUICtrlCreateCheckbox('Blank for future use' ,20, 300, 250, 20)

$cb11 = GUICtrlCreateCheckbox('Blank for future use' ,20, 320, 250, 20)

$b1 = GUICtrlCreateButton('Run scripts that are checked' ,20, 575, 150, 20)

while 1

$msg = GUIGetMsg()

If $msg = -3 Then Exit;exit if press close.

If $msg = $b1 Then do_stuff();perform function 'do_stuff()' if you click the button.

WEnd

Func do_stuff()

If GUICtrlRead($cb1) = 1 Then do_cb1();These 3 lines read the checkboxes and perform a function if they are checked off.

If GUICtrlRead($cb2) = 1 Then do_cb2();Returns value 1 for checked and value 4 for unchecked.

If GUICtrlRead($cb3) = 1 Then do_cb3();You can manipulate these 'if' statements however you need them to work.

If GUICtrlRead($cb4) = 1 Then do_cb4()

If GUICtrlRead($cb5) = 1 Then do_cb5()

If GUICtrlRead($cb6) = 1 Then do_cb6()

If GUICtrlRead($cb7) = 1 Then do_cb7()

If GUICtrlRead($cb8) = 1 Then do_cb8()

If GUICtrlRead($cb9) = 1 Then do_cb9()

If GUICtrlRead($cb10) = 1 Then do_cb10()

If GUICtrlRead($cb11) = 1 Then do_cb11()

EndFunc ;==>do_stuff

Func do_cb1()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_w.exe")

EndFunc ;==>do_cb1

;-------------------------------------------------------------------------------------------------------

Func do_cb2()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_x.exe")

EndFunc ;==>do_cb2

;-------------------------------------------------------------------------------------------------------

Func do_cb3()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_y.exe")

EndFunc ;==>do_cb3

;-------------------------------------------------------------------------------------------------------

Func do_cb4()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_z.exe")

EndFunc ;==>do_cb4

;-------------------------------------------------------------------------------------------------------

Func do_cb5()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_s_w.exe")

EndFunc ;==>do_cb5

;-------------------------------------------------------------------------------------------------------

Func do_cb6()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_s_x.exe")

EndFunc ;==>do_cb6

;-------------------------------------------------------------------------------------------------------

Func do_cb7()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_s_y.exe")

EndFunc ;==>do_cb7

;-------------------------------------------------------------------------------------------------------

Func do_cb8()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_s_z.exe")

EndFunc ;==>do_cb8

;-------------------------------------------------------------------------------------------------------

Func do_cb9()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_w.exe")

EndFunc ;==>do_cb9

;-------------------------------------------------------------------------------------------------------

Func do_cb10()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_w.exe")

EndFunc ;==>do_cb10

;-------------------------------------------------------------------------------------------------------

Func do_cb11()

ShellExecuteWait("C:\Documents and Settings\admin\My Documents\Autoit\s_a_UNM15_e_w.exe")

EndFunc ;==>do_cb11

An individual test script that is called by the above harness GUI script. The program this script executes runs in 600x800 flash (no windows controls, thus the pixelsearches):

;-------------------------------------------------------------------------------------------------------------

;Includes, Options, Hotkey

#Include <ScreenCapture.au3>

_ScreenCapture_SetJPGQuality(80) ;Adjust the compression and size of logfile with the number in the parenthesis (1-100)

AutoItSetOption( "WinTitleMatchMode", 2) ;This option sets the title match mode. 2 - any part of string.

AutoItSetOption( "CaretCoordMode", 0) ;This option sets the caret coord mode to 0 - relative to active window.

;--------------------------------------------------------------------------------

;hotkey exit mod - to kill script hit crt+alt+x simulataneously.

HotKeySet("^!x", "MyExit")

; Rest of Script

Func MyExit()

Exit

EndFunc

;-------------------------------------------------------------------------------------------------------------

;runs "winword".

sleep(1000)

shellexecute("winword")

sleep(1000)

;-------------------------------------------------------------------------------------------------------------

;inserts Test script objectives and the date and time.

WinWaitActive("Word")

sleep(1500)

Send("TEST SCRIPT - Microorganisms and Foodborne Illnesses - UNM15 Spanish- WWR")

Send("{enter}")

Send("The object of this script is to open System, test the Q and A for The Flow of Food - Sam's Food module.")

Send(" It should open a log file called, s_a_UNM15_s_y.docx and document the procedure.")

Send("{enter}")

Send( "!{n}{d}{enter}")

Send("{enter}")

;----------------------------------------------------------------------------------------------------

;starts the System application.

ShellExecute("C:\Program Files\System\DATA\start_sistem.exe")

sleep(1000)

;----------------------------------------------------------------------------------------------------

;test for IR base error window.

$irbase = winexists( "" , "Base" )

If $irbase = 1 then send( "{enter}" ) ; hits enter in case the message box of 'no IR base present' appears.

While @error

PixelSearch( 657, 312, 747, 319, 0xFFFFFF )

WEnd

sleep(5000)

MouseClick( "left" ) ;stops animation

Sleep(2000)

mouseclick( "left" , 703, 297 ) ;Course Selection Menu button.

sleep(1000)

mouseclick( "left" , 99, 122 ) ;Catagory column mouse click. **************

Sleep(1000)

mouseclick( "left" , 311, 172) ;Course column mouse click. **************

Sleep(1000)

MouseClick( "left" , 708, 526 ) ;Continue button to start class.

Sleep(2000)

MouseClick( "left" , 178, 104 ) ;Clicking on the first student in list.

Sleep(1000)

MouseClick( "left" , 702, 521 ) ;Begin class.

Sleep(1000)

MouseClick( "left" , 224, 259 ) ;Select English. This click starts the training video.

;MouseClick( "left" , 382, 261 ) ;Select Spanish. This click starts the training video.

;-----------------------------------------------------------------------------------------------

;All Wrong, Wrong, Right

;Q1 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q2 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q3 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q4 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q5 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q6 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q6b Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;Q7 Format A

sleep(5000)

PixelSearch( 432, 337, 467, 362, 0x3366CC )

While @error

PixelSearch( 432, 337, 467, 362, 0x3366CC )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB1

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

;Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;FB2

sleep(5000)

pixelSearch( 463, 319, 472, 327, 0x3200FE )

While @error

pixelSearch( 463, 319, 472, 327, 0x3200FE )

WEnd

sleep(5000)

;Mouseclick( "left" , 212, 173 ) ;Q1 - selecting answer 1.

Mouseclick( "left" , 610, 170 ) ;Q2 - selecting answer 2.

;Mouseclick( "left" , 224, 406 ) ;Q2 - selecting answer 3.

;Mouseclick( "left" , 600, 395 ) ;Q2 - selecting answer 4.

;-------------------------------------------------------------------------------------------------------------

;N clicking to end

PixelSearch( 530, 485, 540, 495, 0xFFFF00 )

While @error

PixelSearch( 530, 485, 540, 495, 0xFFFF00 )

WEnd

sleep(2000)

send("{n down}")

sleep(500)

mouseclick("left" , 99, 563 )

sleep(500)

send("{n up}")

sleep(2000)

send("{n down}")

sleep(500)

mouseclick("left" , 199, 563 )

sleep(500)

send("{n up}")

;-------------------------------------------------------------------------------------------------------------

;shutting down Sistem

PixelSearch( 312, 311, 317, 316, 0xFAFEFF )

While @error

PixelSearch( 312, 311, 317, 316, 0xFAFEFF )

WEnd

sleep(500)

MouseClick( "left" , 299, 563 )

sleep(500)

MouseClick( "left" , 299, 563 )

;---------------------------------------------------------------------------------------------------

;capturing the XML data

sleep(2000)

run("notepad.exe")

sleep(1500)

send("!{f}{o}")

sleep(500)

send("C:\Program Files\Sistem\DATA\SISTEM_ARCHIVE\AR*.*")

sleep(500)

Send("{enter}")

sleep(500)

send("+{tab}")

sleep(500)

send("{enter}")

sleep(500)

Send("{space}")

sleep(500)

send("{enter}")

sleep(500)

Send("^a")

sleep(500)

send("^c")

sleep(500)

send("!{f4}")

sleep(1000)

winactivate( "Word" )

sleep(1000)

send("{enter}")

send("{enter}")

send("DATA FROM XML FILE ON 'WRONG, WRONG, RIGHT' TEST")

send("{enter}")

sleep(1000)

send("^v")

;-------------------------------------------------------------------------------------------------------------

;-------------------------------------------------------------------------------------------------------------

;-------------------------------------------------------------------------------------------------------------

;Naming and saving log file.

sleep(1000)

WinActivate( "Word" )

sleep(2500)

Send( "!{n}{d}{enter}")

sleep(1000)

Send( "!{f}{a}")

sleep(1000)

Send( "s_a_UNM15_s_y" )

sleep(1000)

Send( "{enter}" )

sleep(1000)

send( "{enter}" )

winactivate( "Word" )

send( "!{altdown}{f4}{altup}" )

sleep(2000)

#CS

UNM15 1 2 3 4 5 6 6B 7

First question: B B A B A D B A

Feedback: D D C D D C D B

------------------------------------------------------------------------------------------------------

1 2 3 4 5 6 7 8 9 10

Lightning Round: Y N N N Y Y Y N N Y

#Ce

Link to comment
Share on other sites

Wooooooah. That's a lot of code! Personally, I'd be tempted to generalise the whole execution script and use an array of script names and one function that runs a script from the array (rather than do_cb7() etc.). Still, that's not your main issue is it?

Perhaps Adlib could be your friend here. When you start a script, set a global variable to say which script you're running. Use an Adlib function to check the global variable and if it doesn't change for 30 minutes then take some action by calling ProcessClose().

I guess you should re-visit your executable scripts as well because if they're hanging then perhaps there's an underlying problem.

WBD

Link to comment
Share on other sites

Wooooooah. That's a lot of code! Personally, I'd be tempted to generalise the whole execution script and use an array of script names and one function that runs a script from the array (rather than do_cb7() etc.). Still, that's not your main issue is it?

Perhaps Adlib could be your friend here. When you start a script, set a global variable to say which script you're running. Use an Adlib function to check the global variable and if it doesn't change for 30 minutes then take some action by calling ProcessClose().

I guess you should re-visit your executable scripts as well because if they're hanging then perhaps there's an underlying problem.

WBD

Thanks for the suggestions WideBoyDixon. I read the adlib help material and it whizzed over my head. I will look for more information on the web on it. Plus I like the idea of usings an array, but each different script I call has specifics about it, like correct answers, that make it different.

I do need to go back and make the individual scripts more robust.

Thanks again for the effort.

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...