Jump to content
Sign in to follow this  
realmccoy01

Loop and entire script

Recommended Posts

realmccoy01

How would I go about looping the entire script several times:

;Declare AutoIT Settings ---------------------

;* These are delays for script execution, increase to slow the script down.

;* Numbers here are in milliseconds.

AutoItSetOption("MouseClickDelay", 2000 )

AutoItSetOption("WinWaitDelay", 3000)

AutoItSetOption("MouseClickDelay", 1500)

AutoItSetOption("SendKeyDelay", 700)

;Declare Globals Here ------------------------

Global $_LoginName = ""

;The person you're logged in as/Want to login as

Global $_LoginPassword = ""

;Login Pass

Global $fmAMDSNagScreen = 1

;Declare Functions to Run Here ---------------

;* This area is for calling out the functions to run from below.d

;* Default is: _Read_EXCEL(), _Login(), _CreateChartNotes()

Global $_R = _Login()

;_Login()

;_Login() ;Waits 20 secs to load. - SS is buggy with this.

;_PrintOut() ;Debugging

;Run("C:\Program Files\AAA\Apps\program.exe")

;*****************************************************************************************

;* _Login - Sets user/pass on Login screen

;*****************************************************************************************

;Do $_R

Func _Login()

;Dim $_UserID = "administrator" -Depricated

;Dim $_Pass = "administrator"

;Start SS

Run("C:\Program Files\e-MDs\Solution Series\Apps\program.exe")

WinWaitActive("Splash Screen")

;Set UserName

ControlClick("Splash Screen", "", "[CLASS:TEdit; INSTANCE:2]")

ControlSend("Splash Screen", "", "[CLASS:TEdit; INSTANCE:2]", "{BACKSPACE 13}")

Sleep(700)

ControlSend("Splash Screen", "", "[CLASS:TEdit; INSTANCE:2]", $_LoginName)

;Set Password

ControlSend("Splash Screen", "", "[CLASS:TEdit; INSTANCE:1]", $_LoginPassword)

;Press OK

ControlClick("Splash Screen", "OK", "[CLASS:TButton; INSTANCE:2]")

;Handle Fax monitor - Uncomment to handle FaxMonitor if open

;WinWaitActive( "e-MDs Fax Monitor" )

;WinClose( "e-MDs Fax Monitor" )

;Open Chart

;*Wait for SS to be active (inconsistant)

;WinWaitActive( "e-MDs Solution Series" )

;Sleep(20000)

ProgressOn("Waiting for SS to Load - 20 seconds", "Increments every second", "0 percent")

For $i = 5 To 100 Step 5

Sleep(1000)

ProgressSet($i, $i & " percent")

Next

ProgressSet(100, "Done", "Complete")

Sleep(500)

ProgressOff()

;*Click Chart on the top menu bar

;ControlClick("e-MDs Solution Series", "", "[CLASS:TfcShapeBtn; INSTANCE:6]")

;Handle First NagBox - Uncomment to handle Nag screen

;HandleLicenseThing2()

;Click Folder

;WinWaitActive("e-MDs Chart - Duz")

;ControlClick("e-MDs Chart - Duz", "", "[CLASS:TPanel; INSTANCE:6]")

EndFunc ;==>_Login

#region ---Au3Recorder generated code Start ---

Opt("WinWaitDelay",100)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

_WinWaitActivate("placel (G2)","")

MouseClick("left",287,37,1)

MouseClick("left",284,58,1)

#region --- Internal functions ---

Func _WinWaitActivate($title,$text,$timeout=0)

WinWait($title,$text,$timeout)

If Not WinActive($title,$text) Then WinActivate($title,$text)

WinWaitActive($title,$text,$timeout)

EndFunc

MouseClick("left",88,118,1)

_WinWaitActivate("placel (G2)","")

MouseClick("left",48,65,1)

_WinWaitActivate("placel (G2) - [Posting]","Zero(0) Balance")

;The following code enter's in a patient search

Send("smith,a{ENTER}")

_WinWaitActivate("Find Bill Patient","Include Inactive Pat")

MouseClick("left",127,90,1)

;The extra mouse click is to make sure focus is set on the window

MouseClick("left",248,14,1)

Send("{ALTDOWN}w{ALTUP}")

;_WinWaitActivate("fmEMDSNagScreen","I have read and unde")

;MouseClick("left",57,397,1)

;Send("{ALTDOWN}o{ALTUP}")

;~ #region --- This section enters in ICD9 and CPT codes

;_WinWaitActivate("Bill Charges & Payments ( Smith, Aileen L )","Print Patient Educat")

;_WinWaitActivate("TfmBILLChargePayment")

MouseClick("left",106,329,1)

Send("514{ENTER}")

MouseClick("left",139,476,1)

Send("99215{ENTER}")

MouseClick("left",376,61,1)

;_WinWaitActivate("Claim Prepare (Patient: Smith, Aileen, Invoice No: 312, Insurance: Medicaid)","Signed Auth Form Blk")

;I removed the statement above because the script was looking for the name of the patient and the invoice number. I am currently

;~ ;researching how to fix this issue 2011-0915

Send("{ALTDOWN}x{ALTUP}")

#region --- Closing the application ---

;_WinWaitActivate(" Charges & Pay ( Smith, Aileen L )","Print Pat Educat")

MouseClick("left",921,55,1)

_WinWaitActivate("Information","&Yes")

MouseClick("left",102,102,1)

_WinWaitActivate("Print Options","Invoice Print Option")

MouseClick("left",78,51,1)

;_WinWaitActivate("placel (G2) - [Posting (Pat: Smith, Aileen L DOB: 02/16/88) (Default Pro: Wallace, Henry R) (Inv Cnt: 4)]","Posting (Patient: Sm")

MouseClick("left",43,203,1)

_WinWaitActivate("placel (G2)","")

MouseClick("left",19,35,1)

MouseClick("left",28,145,1)

_WinWaitActivate("Confirm","&Yes")

MouseClick("left",113,108,1)

Share this post


Link to post
Share on other sites
rcmaehl

Put the entire script in a while statement


My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites
realmccoy01

Thanks , but how would I go about doing this? ( I am a newbie )

Share this post


Link to post
Share on other sites
somdcomputerguy

how would I go about doing this?

Keyword While...WEnd

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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  

×