Jump to content

Search the Community

Showing results for tags 'If WinWaitActivate Then'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello everyone! I'm trying to polish some of my functions now that I botched up my GUI and basic functions, and have a somewhat realiable code. I happen to have a few questions, to which I would like to get some insight from you. I have an "old" problem with my script. While it works with the PDFCreator (1.7.1 but I think It just got updated a few days ago) it sometimes seems to skip ControlSetText. I don't know why this happens but I developed a habbit of double up on it, which decresed the occurrence of these bugs but it's far from a solution, and it isnt even an elegant bandage on it. Anyidea why this could happen? In some other functions I used the click on the said coordinates twice then send Delete and type the name i want, that seems to work well. Another problem is, that sometimes when I try to make the script to click on a button, it simply doesnt do that, or since everytime this button is the Save button (in this example at least) which is the highlighted button on the form I simply used Send("{ENTER}") but it doesnT perform on a 100% neither. Because of this I'm experimenting with the WinWaitActivate 's timeut function. I'm trying to make it so if the window that should pop up next isn't activateing, the script tries to click on the Save button again. When I tried to test it, I commented out the first Save button click to see how it works, and It basicly Jumped a "nameing syntax" ahead (sorry don't really know how else to say it) so instead of blablabla(1) it wrote blablabla(2) and tried to save like that. I think this is because of a logical error from my part, but can't seem to figure it out (Once I get it wrok I think I will write it as a different function and call it everytime i need it, that would make the code a bit more tidy) Also a the beginning of the code I try to handle the possibility of the PDFCreator signaling that there is a new update to download, I tried to check for the MsgBox but it didn't work when a real update came while i was working and it stuck. Makeing things worst I'm not sure how to test it effectivly without actuaql software update, should I try to write a MsgBox for i myself? I don't think thats a dependable test of the script. I would also like to check the Text from the textbox PDFCreator use for saving the PDFs, to see if it's at least something like it should be, I already have a solution for that, and I gonna check for it now but I think this is already a pretty impressive wall of text so thank you if you even read through it. I maybe ask other questions later. Ask anything and I try to provide what you asks for. Thanks again Code: ControlClick("Megerősítés", "Igen", "[CLASSNN:TBitBtn2]") Sleep(500) WinWaitActive("Információ", "Sikeres Topup feltöltés") WinKill("Információ", "Sikeres Topup feltöltés") Sleep(3000) If WinActivate("PDFCreator", "Újabb verzió érhető el:") Then ;PDF Creator new version handleing WinClose("PDFCreator", "Újabb verzió érhető el:") EndIf WinWaitActive("PDFCreator") Sleep(500) ControlFocus("PDFCreator", "", "ThunderRT6TextBox5") Sleep(1000) Local $date = "\" & ControlGetText("PDFCreator", "", "[CLASSNN:ThunderRT6TextBox5]") Local $TopUpdate = "TeszttTopUp_KP_Euro_sztornó_vásárlás" & ControlGetText("PDFCreator", "", "[CLASSNN:ThunderRT6TextBox5]") Local $TopUpdate2 = "TeszttTopUp_KP_Euro_számla_sztornó_vásárlás" & ControlGetText("PDFCreator", "", "[CLASSNN:ThunderRT6TextBox5]") Sleep(500) WinActivate("Folyószámla", "") ControlClick("Folyószámla", "", "[CLASSNN:TAdvBitBtn12]") WinActivate("Információ", "") Sleep(500) Local $Egyenleg = WinGetHandle("Információ", "") _ScreenCapture_CaptureWnd(@MyDocumentsDir & $date & "egyenleg.jpg", $Egyenleg) Sleep(400) WinKill("Információ") WinActivate("PDFCreator") Sleep(2000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate & "(1)") Sleep(500) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate & "(1)") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") Sleep(300) WinWaitActive("Mentés másként", "", 10) If WinWaitActive = 0 Then WinActivate("PDFCreator") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") WinWaitActive("Mentés másként", "", 10) EndIf Sleep(300) Send("{ENTER}") WinWaitActive("PDFCreator","",10) If WinWaitActive("PDFCreator") = 0 Then ControlClick("Mentés Másként","","[CLASSNN:Button1]") WinWaitActive("PDFCreator","",10) EndIf Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate & "(2)") Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate & "(2)") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") Sleep(300) WinWaitActive("Mentés másként", "", 10) If WinWaitActive = 0 Then WinActivate("PDFCreator") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") WinWaitActive("Mentés másként", "", 10) EndIf Sleep(300) Send("{ENTER}") WinWaitActive("PDFCreator","",10) If WinWaitActive("PDFCreator") = 0 Then ControlClick("Mentés Másként","","[CLASSNN:Button1]") WinWaitActive("PDFCreator","",10) EndIf Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate2 & "(1)") Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate2 & "(1)") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") Sleep(300) WinWaitActive("Mentés másként", "", 10) If WinWaitActive = 0 Then WinActivate("PDFCreator") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") WinWaitActive("Mentés másként", "", 10) EndIf Sleep(300) Send("{ENTER}") WinWaitActive("PDFCreator","",10) If WinWaitActive("PDFCreator") = 0 Then ControlClick("Mentés Másként","","[CLASSNN:Button1]") WinWaitActive("PDFCreator","",10) EndIf Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate2 & "(2)") Sleep(1000) ControlSetText("PDFCreator", "", "ThunderRT6TextBox6", $TopUpdate2 & "(2)") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") Sleep(300) WinWaitActive("Mentés másként", "", 10) If WinWaitActive = 0 Then WinActivate("PDFCreator") ControlClick("PDFCreator", "", "[CLASSNN:ThunderRT6CommandButton7]") WinWaitActive("Mentés másként", "", 10) EndIf Sleep(300) Send("{ENTER}") WinActivate("Folyószámla") ControlClick("Folyószámla", "Topup sztornó (utolsó)", "[CLASSNN:TAdvBitBtn13]") ; Miért van Befizetés ablak? WinActivate("Megerősítés") Send("{ENTER}") WinWaitActive("Megerősítés") ControlClick("Megerősítés", "", "[CLASSNN:TBitBtn1]") Sleep(500) WinWaitActive("PDFCreator","",10) If WinWaitActive("PDFCreator") = 0 Then ControlClick("Mentés Másként","","[CLASSNN:Button1]") WinWaitActive("PDFCreator","",10) EndIf
×
×
  • Create New...