Blue_Drache Posted December 17, 2004 Share Posted December 17, 2004 here's the section of code that's causing my headache. The Custom Function in question is the Inelg("400").expandcollapse popup....<snip>.... If $lock = "15939" Then PayLock() Send("{F4}{numpadenter}01{numpadenter}") While EndOfLines() = 0 $test = Inelg("400"); <---- THIS LINE HERE!!!! If $test = 1 Then $inelg = 1 ExitLoop EndIf Send("{F8}") WEnd If $inelg = 1 Then Msgbox(48,"DING","Ineligible code 400 found" & @LF & "Please consult the guidelines", 20) CPT($lock) WinClose($rhelp) WinActivate($e) WinSetState($e,"",@SW_RESTORE) Else WinClose($rhelp) WinActivate($a) Send("{F5}") MsgBox(0,"A-OK!","No Inelgible 400 found." CloseFAF("No Inelgible 400 Found") EndIf EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This function is for finding the ineligible reason codes on the GDSV ; The function [B]should[/B] return a 1 if it finds $icode and a 0 if it doesn't ; Format is Inelg("code") Example: Inelg("T42") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Inelg($icode) GetScreen ($a); Local $inel = "NotAvailalble" $inel = StringLeft(StringTrimLeft(StringMid(StringStripWS(ClipGet(), 8), StringInStr(StringStripWS(ClipGet(), 8), "INELRSNS:"), 30), 9), 9) If StringRight($inel, 3) = $icode Or StringLeft($inel, 3) = $icode Or StringTrimLeft(StringLeft($inel, 6), 3) = $icode Then Return 1 Else Return 0 EndIf EndFunc ;==>InelgGetScreen() returns the screenshot, EndOfLines() works fine, the $inel is a section of the screen that I'm interested in, there will be a 3 character string that will be returned from that variable.... Problem is, Inelg() is returning a 1, even if the $icode isn't in the screen section I'm looking at.I only want a return of 1 if the pattern contained in $icode is found. Where's the banana peel that I tripped on? What did I do wrong? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Blue_Drache Posted December 17, 2004 Author Share Posted December 17, 2004 OK. Thanks Larry. I'll have to test it out later as I'm now supposed to be off the clock. No overtime is offered this week. Thanks Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Blue_Drache Posted December 30, 2004 Author Share Posted December 30, 2004 (edited) Ok, vacation happened inbetween the last reply and I've now had a chance to test it. It works as advertised. It seems the program was getting overworked and needed to sleep. Too many clipget()'s in rapid succession. I guess I'm not a good slave driver Oh well. Learn and let learn. Thanks again Larry. Edited December 30, 2004 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now