Jump to content

Search the Community

Showing results for tags 'solved'.



More search options

  • 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


Location


WWW


Interests

Found 34 results

  1. Hello, I am alwasy struggeling to do multiple things at the same time. I have a main screen with a button which calls the function ninite1. The function "ninite1" then executes and fires a new gui. The program start to run with the gui (test) in the back ground Now I would like to have a counter (_count() which shows how long this program is running within this gui (ninitegui) Somebody? #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <ColorConstantS.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <InetConstants.au3> _ninite1() Func _ninite1() GLOBAL $count = 0 Local $NINITEGUI = GUICreate("Runtimes", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) Local $idLabel2 = GUICtrlCreateLabel("test", 600, 150, @DesktopWidth, 150) GLOBAL $lblData = GuICtrlCreateLabel("", 40, 40,50,50) _Count() Sleep(1000) GUISetState(@SW_SHOW, $NINITEGUI) Run(@ScriptDir & "\Resources" & "\Runtime\ninite.exe") ;Run(@ScriptDir & "\Resources" & "\Runtime\vlcetc.exe") While 1 If ControlCommand("Ninite", "Close", "[CLASS:Button; INSTANCE:1]", "IsEnabled", "") Then ControlClick("Ninite", "Close", 2) Sleep(15) ; Important or you eat all the CPU which will not help the defrag! ExitLoop EndIf WEnd GUIDelete($NINITEGUI) EndFunc ;==>_ninite1 Func _Count() For $i = $count To 100 GuiCtrlSetData($lblData, $i) Sleep(1000) Next EndFunc
  2. Hello, I am tasked with creating a program that will scan a window for an image, if the image is detected it will need to click it, and download it. (I can handle the download part) I have attempted searching online, with no avail. The closest thing I have found is the following: https://www.autoitscript.com/forum/topic/189338-imagesearchau3-help/ I attempted to run the sample / example provided by Danyfirex which the post owner claimed worked for him. I receive no output back from Scite, and am unable to get it working. *what shows in console after attempting to run (Yes I tried running Scite as Admin): >"C:\Users\rmatt\OneDrive\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Users\rmatt\OneDrive\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\rmatt\OneDrive\Autoit Projects\GMR Auto Logger\GMR Auto Logger - LUA.au3" /UserParams >Exit code: 1 Time: 0.1236
  3. Hi, I haven't used Autoit in like 3 years so I'm not sure if something has changed and I'm doing something wrong but the Send() function is not working for me. I'm trying to send 4 Tabs then 2 Enters then some text. I thought it could be the window I'm working with so I just did a simple test and the keys are not being sent. Run("C:\WINDOWS\system32\notepad.exe") WinWait("Untitled - Notepad",0.0) WinActivate("Untitled - Notepad",0.0) WinWaitActive("Untitled - Notepad",0.0) Sleep(3) Send("{TAB}",0) Send("test",0) Send("t",0) Send("e",0) Send("s",0) Send("t",0) Notepad opens fine but then it just sits there. This is the output log: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "E:\AutoIt Projects\test.au3" /UserParams +>16:03:41 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\User\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\User\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:E:\AutoIt Projects\test.au3 +>16:03:41 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "E:\AutoIt Projects\test.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 11.86 I have to stop it because it doesn't do anything at all. I already tried to use sleep thinking it was sending the keys too fast but no dice. Thanks for your help.
  4. Hello everyone, i'm not so expert in autoit, but in these day, I spent some hours to create a script with imagesearch.. I have no syntax error and no logical error (cause the script has worked for some hours..). So i tried to upgrade it and add another function, and there, the script started to give me: if $result[0]="0" then return 0 if $result^ ERROR So i surfed in the threads and i found the fix for it. ANYWAY, the error was just for the last function, the other one was working fine.. just the last one (tested in a new file) gives that error, even if they're using the same library (ImageSearch.au3) If i try to test the last one in the main project, no error but just don't work that function.. In that moment i fixed the $result error with: If (IsArray($result) = False) Then Return 0 But now, all the functions are not working.. i tried adding a msgbox to see if the image was found or not, but it always says not found.. What could be the problem? Anyway thanks for the helping and sorry for my bad english
  5. I've been trying to find a way to make the SplashTextOn positioning be relative to the GUI placement instead of the default x,y screen coordinates. Can anyone offer some assistance?
  6. Hi, I'm writing a script that interacts with a webpage. The contents of the webpage depend on the size of the browser window. To get the (for me) correct contents from the page, the browser window must be maximized. However, I also don't need or want to see the browser window when the script creates it, so it should be invisible. At first I created the browser window with simply this: $oIE = _IECreate ($url ,0 ,0 ,1 ,0) However, from the results I can see that the invisible browser window isn't maximized. So I changed the code to maximize the window, but then it becomes visible. Now I have this: $oIE = _IECreate ($url ,0 ,0 ,1 ,0) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinSetState($hIE, "", @SW_HIDE) ...but then I do see the browser window shortly when it is maximized. I could live with that if it were just a single browser window. But the script is opening (and closing) quite a few browser windows, and I don't wait to see them flicker, nor do I want to (be able to accidentally) interact with these windows. Any ideas on how to create and invisible yet maximized IE windows?
  7. Hello I created a script to split a text file to multiple files based on the first two characters of each line, Example: ORIGINAL.txt: about my brother and me. About me? Naturally, you can't know. Nature must take her course! The result of this example will be two files: AB.txt about my brother and me. About me? NA.txt Naturally, you can't know. Nature must take her course! As you see the first two characters will be the file name. My script does the job. So, What's the problem? The problem is that my script is so slow with big files. I tried it with a text file with 1,000,000 lines and it took about half an hour to finish 20% only. Here is my script: #include <Array.au3> #include <AutoItConstants.au3> #include <File.au3> #include <scriptingdic.au3> ;Download from: https://www.autoitscript.com/forum/topic/182334-scripting-dictionary-modified/ Global $Lines _FileReadToArray("ORIGINAL.txt", $Lines, $FRTA_NOCOUNT) Global $initArr = ["----"] Global $dict = _InitDictionary() $Total = UBound($Lines) $LastRound = 0 For $i = 0 To UBound($Lines)-1 Step +1 ;Extract the first two characters of the current line $FirstTwoChar = StringMid($Lines[$i], 1, 2) ;Replace symbols that are not valid for file names $FirstTwoChar = StringReplace($FirstTwoChar, " ", "_") $FirstTwoChar = StringReplace($FirstTwoChar, "<", "_") $FirstTwoChar = StringReplace($FirstTwoChar, ">", "_") $FirstTwoChar = StringReplace($FirstTwoChar, "?", "_") $FirstTwoChar = StringReplace($FirstTwoChar, '"', "_") $FirstTwoChar = StringReplace($FirstTwoChar, "|", "_") $FirstTwoChar = StringReplace($FirstTwoChar, ":", "_") $FirstTwoChar = StringReplace($FirstTwoChar, "\", "_") $FirstTwoChar = StringReplace($FirstTwoChar, "/", "_") ;Add the first two characters as a key in the dictionary with an array as its value. if not _ItemExists($dict, $FirstTwoChar) then $initArr[0] = $FirstTwoChar _AddItem($dict, $FirstTwoChar, $initArr) EndIf ;Add the current line to the array. $tmpArray = _Item($dict, $FirstTwoChar) _ArrayAdd($tmpArray ,$Lines[$i]) _ChangeItem($dict, $FirstTwoChar, $tmpArray) ;Show progress on the screen $Percent = $i / $Total * 100 if round($Percent) <> $LastRound then ToolTip('...'&round($Percent)&"%",0,5) $LastRound = round($Percent) EndIf Next ;Save each array as text file DirCreate("result") For $Key In $Dict $FinalArray = _Item($dict, $Key) $FileName = $FinalArray[0] _ArrayDelete($FinalArray, 0) ;_ArrayDisplay($FinalArray) _FileWriteFromArray("result\"&$FileName&".txt", $FinalArray) Next My limitations: * Lines must stay in the same order. You can't change lines order while processing the file. Any idea to make this script fast? Thanks. Example of ORIGINAL text file.rar
  8. Hello, I am wondering how to "scroll" to left and right (till the end ) on a webpage . Sending Arrow left/right only moves a bit, I wan to move isntaly to the end Up and down is easily done sending Page Up and Page Down. Any ideas? Greetings Hendrik
  9. Hey folks, I have a little problem with my script. I have no experience with these things, and I know for sure that my code is not the best, but please be lenient, thanks 😅 The User should first choose 1 of the 2 Options to actually start the script. If 1 of the 2 Option is choosen then the User should click start again and all should work. I have already commented the problem, If the button Start is clicked before, the User will select just 1 of the 2 option and the program will start (Without clicking start).How can I set $Start to $GUI_UNCHECKED? I have already tried to use GuiCtrlSetState, but didnt worked. $Start = GuiCtrlCreateButton("Start", 20, 200, 90, 50,bitor($BS_CENTER,0,0)) GUICtrlSetOnEvent($Start,"Startallrun") Func Startallrun() If ((GUICtrlRead($Option1) = $GUI_UNCHECKED) And (GUICtrlRead($Option2) = $GUI_UNCHECKED)) Then MsgBox($MB_OK, "Error", "You have to select 1 Option") While (GUICtrlRead($Option1) = $GUI_UNCHECKED) Sleep(10) If (GUICtrlRead($Option1) = $GUI_CHECKED) Or (GUICtrlRead($Option2) = $GUI_CHECKED) Then GUICtrlSetState($Start,$GUI_UNCHECKED) ; This doesen't work for Buttons While (GUICtrlRead($Start) = $GUI_UNCHECKED) Sleep(10) If ($Start = $GUI_CHECKED) Then ; That's the problem. The script will start if I click one of the 2 options (because start was already checked before) ExitLoop EndIf WEnd ExitLoop EndIf WEnd Else If (GUICtrlRead($Option1) = $GUI_CHECKED) Then MsgBox($MB_OK, "Starting", "Start") Start() EndIf EndIf EndFunc
  10. Hello Internet, I am trying to create 10 labels, which all show a history of transactions, in order. Problem is, it get's confused when I try to use [$i] to create different variables. How can I create different labels and thus variables with this? For $i=1 to 10 Assign("PayH_" & $i, 20) ;Creates the variables for the values Global $PayHLabel_[$i] = GUICtrlCreateLabel($PayH_[$i], 30, 30) ;Creates the labels which show the values Next I know I can do this without a For Loop, but I am trying to learn how to keep my script short. Thanks in advance.
  11. $x1 = InputBox("xx", "xxxx?") if ($x1 = 1) Then MouseClick(132,393,1) Sleep(5000) EndIf So if I input 1 the if statement should work but it won't, what I wrong?
  12. I'm getting an error in this script: Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) TrayTip("clears any tray tip","",0) AutoItSetOption("TrayIconDebug", 1) ;0-off #include "OSVersion.au3" Run('C:\Dnload\9xAddons\TestThis.exe') MsgBox("","Test","$ProgramFiles - " & $ProgramFiles & @CRLF & "_OSVersion() - " & _OSVersion()) Exit This is the error I am getting: The variables should be defined in the #include "OSVersion.au3" Func _OSVersion() Global $OSVersion Local $sWinVer = FileGetVersion('winver.exe') $OS_Version = @OSVersion $servicepack_version = StringReplace(@OSServicePack, "Service Pack ", "SP") If @error = -1 Then $servicepack_version = "" ConsoleWrite($OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') & @CRLF) ConsoleWrite(@OSArch & @CRLF) If $OSVersion = 'Win7' Or $OSVersion = 'Win7SP1' Or $OSVersion = 'Win7X64' Or $OSVersion = 'Win7SP1x64' Then $ProgramFiles = "C:\Programs\" Else $ProgramFiles = "C:\Program Files\" EndIf Return $OS_Version & $servicepack_version & StringRegExpReplace(@OSArch, '(X86)', '') EndFunc ;==>_OSVersion What do I need to do to resolve the error? Thanks, Docfxit
  13. Hi All, Need a help with Autoit task, I am trying to copy an XML file and edit that XML file and copy it back The script i have attached if the script we use to copy files to client from server, so basically what it does is Going through a Set of IP address and Map the drive Copy the file Write copy process was success Goes on a loop through IP's to check all machines have updated files #include <File.au3> #include <iNet.au3> #include <_XMLDomWrapper.au3> func latestUpdate($address, $name) Local $result Local $hFileIndexHTML DriveMapDel ( "G:" ) ConsoleWrite('Trying: ' & $address & "/" & $name & @CRLF); $result = DriveMapAdd ( "G:", "\\" & $address & "\C$", 0, $name & "\adminname","adminpswd") ;Copying the file from Mapped drive to local if $result = 1 Then FileCopy( "G:\Program Files\test.xml", "C:\sample\test.xml", 1); ConsoleWrite('Copying Updated File: ' & $address & @CRLF); $hFileIndexHTML = FileOpen("C:\sample\test.txt", 1) FileWrite($hFileIndexHTML, $address & @CRLF) FileClose($hFileIndexHTML) EndIf EndFunc func done($file, $address) For $i = 1 to _FileCountLines($file) $line = FileReadLine($file, $i) if ( $address = $line ) Then ConsoleWrite('Already done: ' & $file & " " & $address & @CRLF); return true EndIf Next return false EndFunc func getMachineName($ipaddress) return _TCPIpToName($ipaddress) EndFunc func process($address) local $machineName $machineName = getMachineName($address) if ($machineName = "") Then ConsoleWrite("No machine found at:" & $address & @CRLF) Else ConsoleWrite("Machine found at:" & $address & " - " & $machineName & @CRLF) if ( done( "C:\sample\test.txt", $address) = false ) then if ( $machineName <> "" ) then latestUpdate($address, $machineName) else endif endif EndIf EndFunc TCPStartup() while 1=1 PROCESS("10.10.1.1") sleep( 1000 * 60 * 10) wend The XML file i am trying to copy is unique and different in all machines (Machine name,ID's etc), But whole structure is the same (ie, the num of lines ) [That's the reason i can't copy a single file to all the machines]. I was thinking of using _FileWriteToLine to replace 3 lines with new data eg: _FileWriteToLine("c:\sample\test.xml", 71, "<RIA>"http://goog.html"</RIA>", True) _FileWriteToLine("c:\sample\test.xml", 350, "<col header="Status" width="7%" dataFld="status_code" style="" preprocesser="processES" template="" hidden="0"/>", True) _FileWriteToLine("c:\sample\test.xml", 650, "<col header="Units" width="11%" dataFld="units" style="" preprocesser="" template="fU(units)" hidden="0"/>", True) These lines inside XML 340<em> 341<gd 342-360 is similar as blah blah <col header="Status" width="7%" dataFld="status_code" style="" preprocesser="processES" template="" hidden="0"/> same goes for 650th line also I would like to get opinion of copying this file as this is a highly critical file needed to keep machines running Do you think using _file write to line is risky?. Do you think i have to copy the file from parent folder to another folder after replacing the lines and then copy from there back to client system. This is all what i can think now, Any comments/suggestions will be much appreciated.
  14. I need to open a program for part of my script; the name of the program is "Cisco IP Communicator". The two ways I know to open the program right now are to either to click on the desktop shortcut ("Cisco IP Commincator.lnk") or by viewing the shortcut's target file location, and running the .exe file ("communicatork9.exe"). The code I'm using is as follows: #RequireAdmin $ciscoApp = "C:\Program Files (x86)\Cisco Systems\Cisco IP Communicator\communicatork9.exe" Run($ciscoApp) Whenever I run this script, I am prompted for administrator access and then nothing happens. If anyone has any suggestions on how to fix this issue, I'd really appreciate it. Thanks!
  15. As explained elsewhere the idea is to highlight a phone number in an e-mail, docx or PDF and to press Capslock to get get it formatted properly and pasted into our softphone client and dial the number. Problem here is twofold: - the number gets pasted and dialing starts but then interrupts (as if ESC were pressed) and then immediately dialing starts again and the call goes out - once the number has been dialed successfully and the clipboard emptied, another press on Capslockon another highlighted phone number should do the same. What happens though is that this new number does get pasted but not formatted. Any idea what's wrong with my loop/function? #include <Clipboard.au3> While ProcessExists("3CXWin8Phone.exe") HotKeySet("{CAPSLOCK}", "GetNumber") WEnd Func GetNumber() Opt("SendCapslockMode",0) Send("{CAPSLOCK OFF}") Send("^c") $n = ClipGet() $n = StringRegExpReplace("0" & $n , _ '^(?:0\+49|0\d|(0)\+(\d\d))(?:\h*\(0\))?\D*0?(\d+)\D*(\d+)\D*', "0$1$2$3$4") ClipPut ($n) WinActivate("3CX - ") WinWaitActive("3CX - ") Send("^v") Sleep(500) Send("{ENTER}") ClipPut ("") EndFunc Exit
  16. Hi guys! I'm looking for your help The problem is: when I got the iFrame object at the page's source code, the return was "ok", but when I tryed to pick the iFrame's source code, the result is "nothing". Even use the _IETagNameAllGetCollection and others similar functions the result is the same: "nothing" Au3 Script: ... #include<IE.au3> Local $oIE = ... Local $oFrame = _IEGetObjById($oIE, "_wicket_window_3") ConsoleWrite(IsObj($oFrame) & @CRLF) ;RESULT = 1 ConsoleWrite($oFrame.outerHtml & @CRLF) ;RESULT = NOTHING Principal Page's source code: Note: the form tag doesn't have a ID or Name, but if I look for iFrame from $oIE source code, It's "ok". <html> ... <body> ... DIVs, INPUTS, and so forth ... <div class="wicket-modal" id="_wicket_window_0" role="dialog" aria-labelledby="Portal da Portabilidade de Crédito" style="left: 283px; top: 273.5px; width: 800px; visibility: visible; position: absolute;"> ... DIVs, INPUTS, and so forth ... <form style="border-width: 0px; margin: 0px; padding: 0px; position: static; background-color: transparent;"> ... DIVs, INPUTS, and so forth ... <iframe class="wicket_modal" id="_wicket_window_3" src="" frameborder="0" style="height: 620px;" allowtransparency="false"></iframe> ... DIVs, INPUTS, and so forth ... </form> ... DIVs, INPUTS, and so forth ... </div> ... DIVs, INPUTS, and so forth ... </body> </html> iFrame's "_wicket_window_3" source code, viewed by IE Element Inspector (I WANNA GET THIS): <html xmlns="http://www.w3.org/1999/xhtml"><head><script src="/static/js/jquery-1.8.3.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1408133796000.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1408133796000.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1408133800000.js" type="text/javascript"></script> <link href="../../wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1408133800000.css" rel="stylesheet" type="text/css"> <script id="wicket-ajax-base-url" type="text/javascript"> /*<![CDATA[*/ Wicket.Ajax.baseUrl="ctc/portabilidadeContaSalario/detalhar?3"; /*]]>*/ </script> <script src="../../../../static/js/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> <link href="../../../../static/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex"> <link href="../../static/css/ctc.css" rel="stylesheet" type="text/css"> <link href="../../static/css/ctc_custom.css" rel="stylesheet" type="text/css"> <script src="../../static/js/deployJava.js" charset="utf-8"></script></head><body><object width="0" height="0" id="deployJavaPlugin" classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" data="data:application/x-oleobject;base64,rO/+ysfeAAAAAavN7/7cugAKAAAAAAAAAAAAAA=="></object> <script src="../../static/js/jquery-ctc.js" charset="utf-8"></script> <script src="../../static/js/signUtils.js" charset="utf-8"></script> <script src="../../static/js/json3.in.js" charset="utf-8"></script> <script src="../../static/js/menu2.js" charset="utf-8"></script> <script src="../../static/js/componentTicket.js" charset="utf-8"></script> <script src="../../static/js/appletScript.js" charset="utf-8"></script> <script src="../../static/js/biginteger/bigInteger.js" charset="utf-8"></script> <link href="../../favicon.ico" rel="icon" type="image/ico"> <script id="jquery.blockui" src="../../static/js/jquery.blockUI.js" type="text/javascript" charset="utf-8"></script> <script id="jquery.maskedinput" src="../../static/js/jquery.maskedinput-1.3.1.min.js" type="text/javascript" charset="utf-8"></script> <script id="jquery.priceformat" src="../../static/js/jquery.price_format.2.0.js" type="text/javascript" charset="utf-8"></script> <script src="/csrfTokenS" type="text/javascript"></script> <script type="text/javascript"> /*<![CDATA[*/ Wicket.Event.add(window, "domready", function(event) { Wicket.Ajax.ajax({"sc":"content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divTitle:btnRecolheAbba","c":"btnRecolheAbba4e","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm-divTitle-btnRecolheAbba","e":"click","f":"dataForm4d","m":"POST"});; $(document).ready(function(){if(isChrome()) { $('#contentChild').css({ 'border-top':'solid 1px white'});}window.scrollTo(0,0);; $("#cpfCli4f").mask("999.999.999-99",{}); $("#cpfCli4f").mask("999.999.999-99",{}); $("#TelCli50").mask("(99)99999999?9",{});}); Wicket.Ajax.ajax({"sc":"content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:containnerButtons:containerAcionsButtons:1:actionButton","c":"actionButton51","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm-containnerButtons-containerAcionsButtons-1-actionButton","e":"click","f":"dataForm4d","m":"POST"});; Wicket.Ajax.ajax({"c":"dataForm4d","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm","e":"submit","f":"dataForm4d","m":"POST"});; Wicket.Ajax.ajax({"c":"contentForm52","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm","e":"submit","f":"contentForm52","m":"POST"});; Wicket.Ajax.ajax({"c":"layoutForm","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm","e":"submit","f":"layoutForm","m":"POST"});; ;}); /*]]>*/ </script> <title>Portal da Portabilidade de Crédito</title> <div id="rootContent"> <div id="main" style="margin: 0px;"> <div id="corpo"> <div id="blocoDireito" style="padding: 0px; top: 0px;"> <form id="layoutForm" action="./detalhar?3-1.IFormSubmitListener-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm&amp;SECURITYTOKEN=HIMY-BPSD-5C7F-20H2-XERE-E38O-YKYZ-VVB7-H53V-M9FA-B4CB-P3E6-557U-T5J7-IB1Q-N256" method="post" defaultform="true"><div style="left: -100px; top: -100px; width: 0px; height: 0px; overflow: hidden; position: absolute;"><input name="layoutForm_hf_0" id="layoutForm_hf_0" type="hidden"></div> <div id="messagePanel" style="display: none;"></div> <div id="pagina"> <div id="contentChild"> <div id="contentForm52" defaultform="true"> <div id="right" style="margin: 0px;"> <div id="conteudo" style="margin: 0px;"> <span><h3 style="margin: 0px 0px 10px; padding: 0px;"> <font color="gray">NU Portabilidade: </font>201807110000056998252 <br><font color="gray">Situação: </font>Aceite Compulsório por falta de resposta do Participante Folha de Pagamento <br><font color="gray">Data: </font>17/07/2018 <br><font color="gray">Motivo: </font>Aceite Compulsório por falta de resposta do Participante Folha de Pagamento</h3></span> <span> <div class="passos" id="divBreadCrumb53"> <div class="passo ativo"> <div class="passo numero ativo"><span>1</span></div> <div class="passoTexto"><span>Cliente</span></div> <br class="clr"> <div class="passoStatus"><span>Você está aqui</span></div> </div> <div class="passo inativo"> <div class="passo numero inativo"><span>2</span></div> <div class="passoTexto"><span>Participante</span></div> <br class="clr"> <div class="passoStatus"><span>Você está aqui</span></div> </div> </div> <div id="divTab54"> <div class="passosConteudo"> <div> <div id="AbaCliente_0" ticket="Identificação do cliente" containnerpath="AbaCliente_0" containnerid="AbaCliente_0"> <div id="dataForm4d" defaultform="true"> <table style="width: 726px;" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td class="destaqueTb" style="width: 100%;"> <span class="tituloTb">Identificação do cliente</span> <span class="imgTb"><input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divTitle:btnRecolheAbba" class="btRecolher" id="btnRecolheAbba4e" type="button"></span> </td> </tr> <tr> <td class="blocoDados2 itemVisivel" id="divContent_tabContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td> <div class="dados"> <span>CPF *</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:cpfCli" disabled="disabled" id="cpfCli4f" style="width: 210px;" maxlength="15" value="01234567890" ticket="CPF" mask="CPF" unmask="true" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td colspan="2"> <div class="dados"> <span>Nome *</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:NomCli" disabled="disabled" id="NomCli55" style="width: 550px;" type="text" maxlength="80" value="JOAO DA SILVA" ticket="Nome" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td> <div class="dados"> <span>Telefone</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:TelCli" disabled="disabled" id="TelCli50" style="width: 210px;" type="text" value="" ticket="Telefone" mask="TELEFONE_DDD_XSD" unmask="false" ticketpath="AbaCliente_0"> </div> </td> <td> <div class="dados"> <span>Email</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:EmailCli" disabled="disabled" id="EmailCli56" style="width: 300px;" type="text" maxlength="50" value="" ticket="Email" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td> <div class="dados"> <span>Código Autenticação do Beneficiário</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:codigoAutenticacaoBeneficiario" disabled="disabled" id="codigoAutenticacaoBeneficiario57" style="width: 210px;" type="text" maxlength="100" value="" ticket="Código Autenticação do Beneficiário" ticketpath="AbaCliente_0"> </div> </td> </tr> </tbody></table> </td> </tr> </tbody></table> <div class="botoes"> <input name="ACTION" class="botao botaoPadrao" id="actionButton51" type="submit" value="Próximo"> </div> </div> </div> </div> </div> </div> <div class="botoes" id="divBotoes58" style="margin: -30px 0px 4px;"> </div> </span> <span></span> </div> </div> </div> </div> <div id="popUpWindow59" style="display: none;"> <div id="content5a" style="display: none;"></div> </div> <div id="popupConfirmacao5b" style="display: none;"> <div id="content5c" style="display: none;"></div> </div> </div> <input name="SECURITYTOKEN" type="hidden" value="XXXX"></form> <br class="clr"> </div> </div> </div> <script type="text/javascript"> /*<![CDATA[*/ $(document).ready(function() { setInterval(function() { var data = new Date(); var options = { year: "numeric", month: "numeric", day: "numeric" }; $('#dataHora').html(data.toLocaleTimeString("pt-BR", options)); }, 1000); }); /*]]>*/ </script> </div> <div style="display: none;"> <h1 id="blockUIView"><img width="40" height="40" style="top: 15px; position: relative;" src="../../static/imagens/big-roller.gif"><span id="messageWait">Por favor, aguarde...</span></h1> </div> <span id="confirmationDialog5d" style="display: none;"> </span> <script>var attributes = {"id":"ecpfApplet","codebase":"*","height":"1","width":"1","code":"br.org.cip.applet.EcpfApplet"}; var parameters = {"jnlp_href":"/jnlp/generator/ecpf.jnlp"}; var version = "1.6"; var applet = deployJava.runApplet(attributes,parameters,version);</script><applet width="1" height="1" id="ecpfApplet" codebase="*" code="br.org.cip.applet.EcpfApplet"><PARAM NAME="_cx" VALUE="26"><PARAM NAME="_cy" VALUE="26"> <param name="jnlp_href" value="/jnlp/generator/ecpf.jnlp"><param name="codebase_lookup" value="false"> </applet> <span id="asynchronousComponent5e" style="display: none;">Asynchronous</span> <script type="text/javascript"> /*<![CDATA[*/ /*** $(document).ready(function() { alert('Completou a renderização'); }); $("#tableRender").ready(function() { alert("Table rendered finish"); }); ****/ $.blockUI.defaults.message = $('#blockUIView'); var assyncProcess = false; $(document).ajaxStart(function() { if(!assyncProcess) $.blockUI(); }).ajaxStop(function() { if(!assyncProcess) $.unblockUI(); }); var fieldNamesError = new Array(); var fieldNamesNoError = new Array(); function fieldsDecorator(fieldError,fieldNoError) { fieldNamesError = fieldError==null?fieldNamesError:fieldError; fieldNamesNoError = fieldNoError==null?fieldNamesNoError:fieldNoError; } function decorator() { $.each(fieldNamesError, function( key, val ) { var selectorID = val;//"[ticket='"+val+"']"; $(selectorID).addClass("inputError"); }); $.each(fieldNamesNoError, function( key, val ) { var selectorID = val;//"[ticket='"+val+"']"; $(selectorID).removeClass("inputError"); }); } function isInternetExplorer() { var ie = navigator.userAgent.toString().toLowerCase().indexOf('msie')>0; return ie; } function isChrome() { var chrome = navigator.userAgent.toString().toLowerCase().indexOf('chrome')>0; return chrome; } function assynchronousProcessing(imageurl,message) { assyncProcess = true; $.unblockUI(); $.blockUI({ message: '<h1><img height="40" width="40" style="position:relative; top:15px;" src="'+imageurl+'" /> '+message+'...</h1>' }); } /*]]>*/ </script> </body></html> Well, I'll appreciate all kind of help. Thank you!
  17. I keep writing and deleting my code and I'm having a rough time getting something to work.. I cant for the life of me figure out how to move files from a sub folder into its parent folder. Preferably moving only one file type(*.bps) then deleting the old subfolder and all of its contents. I also want to ignore the folder named "finished" Here's my broken code that gets a stack overflow Func subfolders() $aFileList = _FileListToArray(@ScriptDir & "\Patches\", "*",2) if IsArray($aFileList) Then While $arraynumber < ($aFileList[0]+1) if StringInStr($aFileList[$arraynumber],"Finished",2) then $arraynumber = $arraynumber + 1 subfolders() Else DirMove(@ScriptDir & "\Patches\" & $aFileList[$arraynumber],@ScriptDir & "\Patches\") subfolders() EndIf WEnd EndIf endFunc $arraynumber = 1 subfolders()
  18. Hello...:) I have done extensive searches on this issue before posting but have not found a solve. Any help will be greatly appreciated. ;I have a valid AutoIt support question and kindly provided the details of my system: ;AutoIt Version: V3.3.14.2 [X32] ;Windows Version: WIN_VISTA [X86] ;Language: English (0409) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $form = GUICreate("O_o", 146, 66, -1, -1) Global $inputNorth = GUICtrlCreateInput("", 12, 24, 53, 21) Global $btnSet = GUICtrlCreateButton("Set Controls", 72, 16, 65, 33, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) HotKeySet("{UP}","_north") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btnSet Global $goNorth= "-" & GUICtrlRead($inputNorth) MsgBox(0,"", "go north: " & $goNorth) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;functions Func _north() $pos=MouseGetPos() MouseMove($pos[0], $pos[1]$goNorth,0) ;-results in syntax error EndFunc As you can see, $goNorth gets its value from $inputNorth (the MsgBox shows it works) But I cannot get MouseMove() to take $goNorth If I use: MouseMove($pos[0], $pos[1]$goNorth,0) --I get a syntax error. If I use: MouseMove($pos[0], $pos[1] & $goNorth,0) --I no longer get a syntax error, but that's not right so the function, (likely), moves by zero. So is there a way I can get MouseMove() to take a variable for that parameter? Thank you in advance should you choose to help!
  19. All, I'm working on automating the update process for a piece of software that we use at my company. The installer file always contains the version number as a part of the file name (eg InstallFile_9342.msi) and the numbers always change with every update. How do I use AutoIt to run the program? I know I can't use a wildcard in place of the numbers when using the "Run" command. I tried Local $aArray = _FileListToArray("C:\path\to\file", "InstallFile_*.msi", 0, 1) Run("$aArray") and I also tried Local $bInstall = FileFindFirstFile("InstallFile_*.msi") Run("$bInstall") and neither worked. Can someone please point me in the right direction? I've done some searching on the forum and haven't found anyone in a similar situation before. Thanks!
  20. I have a program that has a control that changes color a few seconds into running. So ideally, I would poll this to tell when an event has occurred. I can't seem to retrieve the correct color value for a control. It always seems to return white indicating that its selecting somewhere else in the window. In the PixelGetColor call I'm adding half the width to the x value and subtracting half the height to the y value in order to get the center of the control. (assuming the coords returned by ControlGetPos are top left - which i can't be sure of) But I've also tried without modifying the x/y and with changing the PixelCoordMode option to 2. Maybe I'm making a silly mistake and can't see it? Any help would be appreciated. Code is below: Opt("PixelCoordMode", 0) FileChangeDir( "C:\Where\My\File\Is" ); Run( "MyProgram.exe" ) Local $hClient = WinWaitActive( $CLIENT_TITLE, "", 10 ) Local $systemIndicatorClassNN= "[CLASS:Qt5QWindowIcon; INSTANCE:99]" Local $hSystemIndicator = ControlGetHandle ( $hClient, "", $systemIndicatorClassNN) Local $xywh = ControlGetPos ( $hClient, "", $hSystemIndicator ) For $i = 10 To 1 Step -1 $color = PixelGetColor ( $xywh[0] + ($xywh[2]/2), $xywh[1] - ($xywh[3]/2), $hClient ) LogToFile( $color ) Sleep( 2000 ) Next
  21. Hello. I have a program XX that asks for user confirmation on exit, which hangs the system reboot/shutdown process until I confirm. So I decided create a autoit script that would automatically close that dialog and let the system reboot/shutdown. The problem I'm facing is that my scripts now exits before the XX. Is there a way delay script exit until the XX is closed but only when system is rebooting/shutting down? Thank you.
  22. Hi, I created a gui with date field but formatted as time in HH:mm. It always shows "now-time". Even if I try to set it with GUICtrlSetData. #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() GUICreate("My GUI get date", 200, 200, 800, 200) Local $idDate = GUICtrlCreateDate("", 20, 20, 100, 20, $DTS_TIMEFORMAT) ; to select a specific default format Local $sStyle = "HH:mm" ; Just display hours and minutes <<<<<<<<<<<<<<<<<<<<<<<<<<<< GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) ConsoleWrite(GUICtrlRead($idDate) & @CRLF) GUICtrlSetData($idDate, "00:00") ConsoleWrite(GUICtrlRead($idDate) & @CRLF) GUISetState(@SW_SHOW) ; Loop until the user exits. While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd MsgBox($MB_SYSTEMMODAL, "Time", GUICtrlRead($idDate)) EndFunc ;==>Example How can I set the time field with another time and how can this field be set blank? Regards, Conrad
  23. Edit: The solution! Maybe? I need to download an image from a website using AutoIt but the download, when viewed in a text editor, does not appear to be the same as if I had downloaded it from a web browser. Could anyone help me figure out why this is happening? I've already tried _INetGetSource, InetGet, _IENavigate, wget, this, and a few .bat and .vbs scripts. Example Code: #include <Inet.au3> Local $source = _INetGetSource("http://c0.rbxcdn.com/0db36a45eae4838667ae9a46ba0c082a") Local $newfile = FileOpen(@ScriptDir & "\test.txt", 2) FileWrite($newfile, $source) FileClose($newfile) Image URL: http://c0.rbxcdn.com/0db36a45eae4838667ae9a46ba0c082a Screenshot attached.
  24. SOLVED Basically, my script needed a conditional assignment to a variable. It needed to check if the size of the array was valid before assigning any value to the variable. So I've got a data entry task that I've been trying to automate. I actually have the script running, it cycles, draws it's necessary arrays, etc. But it will only cycle up to count #22, 23+ do not work. THE GIST I have two excel documents that I draw the data from. $aWO array has values from one of these documents. The instructions to draw these are under _at_wo(). This function feeds into another function to compare a derived value from the first file and request it's corresponding value. In order to do this, I used _Excel_RangeFind() (had to comment out the Cell Name and Cell Comment aspects of that function in order for it to work at all.) Then I pull the address information from array $aTracking[0][2], swap the column from A to B, and it works beautifully. Then cycle 23 happens, and then $aTracking[0][2] reports as out of range. Why? Here's the code. Error reported from line #70. This array call works on loops 1-22 ($iCount value 0-21) http://pastebin.com/Bd5v6Dbc
  25. Hi, I have to set a resizing mode to differents controls in a hidden gui, that gui is initialised (hidden) and resized by a WinMove. But when i show it, control are not resized where thez should. There is a simple code that reproduce the problem. Same gui, same content, one displayed then moved, the other moved then displayed : #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Global $gui[2] Global $labels[2] Global $taille[2] = [200, 100] For $i = 0 To UBound($gui, 1) - 1 $gui[$i] = GUICreate($i, $taille[0], $taille[1], $i * ($taille[0]+100) + 500, (@DesktopHeight-$taille[1])/2) GUISetOnEvent($GUI_EVENT_CLOSE, "quit", $gui) $labels[$i] = GUICtrlCreateLabel("Test resizing...", $taille[0]-105, $taille[1]-25, 100, 20) GUICtrlSetBkColor($labels[$i], 0xE0E0E0) GUICtrlSetResizing($labels[$i], BitOR($GUI_DOCKRIGHT, $GUI_DOCKBOTTOM, $GUI_DOCKWIDTH, $GUI_DOCKHEIGHT)) Next GUISetState(@SW_SHOW, $gui[0]) For $i = 0 To UBound($gui, 1) - 1 WinMove($gui[$i], "", Default, Default, $taille[0]+100, $taille[1]+100) Next GUISetState(@SW_SHOW, $gui[1]) While(True) Sleep(10) WEnd Func quit() Exit EndFunc Is that a bug or do miss i something ? EDIT : This bug disapear if gui is shown at lease one time (even if hide then)
×
×
  • Create New...