spoo Posted June 7, 2018 Share Posted June 7, 2018 Hi All, since Sikuli works great with citrix application i invoked sikuli code from my autoIT script. now can anyone help me how do i fetch the variable that i am using in sikuli on my autoIT script Here is the piece of code from autoIT that invokes sikuli If $supplierBlank==True Then $fPath ="D:\Publish" ;@ScriptDir ClipPut(" ") If FileExists($fPath & "\test.bat") Then FileDelete($fPath & "\test.bat") EndIf FileWrite($fPath & "\test.bat","E:" & @CRLF & "java -jar " & $fPath & "\trail_sikuli.jar --args " & $part_nos_suppliers & "," & $username_citrix & "," & $Decrypted_Pwd) RunWait($fPath & "\test.bat") $supplierName = ClipGet() ;ConsoleWrite($supplierName) $supplierName = StringStripWS($supplierName,7) ;ConsoleWrite($supplierName & @CRLF) _IEFormElementSetValue($supplier,$supplierName) EndIf Here is the code from sikuli import sys.argv #part_nos_suppliers="315W1311-15,315W1311-11" part_nos_suppliers=sys.argv[2] username=sys.argv[3] password=sys.argv[4] words=part_nos_suppliers.split(",") suppliers="" if exists("1528364750583.png"): for current_words in words: Debug.log("part no"+part_nos_suppliers) mouseMove(Pattern("1528365140139.png").targetOffset(190,-4)) mouseDown(Button.LEFT) mouseMove(Pattern("1528364892470.png").targetOffset(236,4)) mouseUp(Button.LEFT) type("c",KEY_CTRL) suppliers=suppliers + "," +current_words + ":" +Env.getClipboard() Debug.log(str(suppliers)) Please help me fetch variable "suppliers" that is on sikuli to AutoIT Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 7, 2018 Moderators Share Posted June 7, 2018 Better asked on a sikuli forum, but does the sikuli script have a method for writing to STDOut? You can then capture that on the AutoIt script. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
spoo Posted June 8, 2018 Author Share Posted June 8, 2018 Thanks JLogan3013. I Figured it out:) suppliers=suppliers + "," +current_words + ":" +Env.getClipboard() Debug.log(str(suppliers)) my_file=file(pathname+"/suppliers.txt", "w") my_file.write(str(suppliers)) my_file.close i copied the information into a file and i'm reading that file from AutoIT. Happy learning ! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 8, 2018 Moderators Share Posted June 8, 2018 Glad you got it working. Again, though, if sikuli supports a standard output model, you can skip the middle man and read it directly; would increase the efficiency of your script. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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