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

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 20 results

  1. 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
  2. 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!
  3. 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()
  4. 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!
  5. 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
  6. 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!
  7. 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.
  8. 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
  9. 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.
  10. 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)
  11. 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
  12. Hi, I updated to the last version. Since then a lot of functions are not working. For instance expanding abbreviation. My au3abbrev.properties are correct and abbrev.properties are including both import lines. The abbreviation is red but won't expand. Neither with space nor Ctrl+B. Debug to msgbox and console not working, list functions, jump to function, open include too. SciTE Jump works. Block and box comment too. I have the feeling all functions especially for autoit are not working. Any help? Regards, Conrad
  13. Hello everyone, I just have a beginner question: is there a way to count duplicates in an array? If you don't see what I mean, here is an example of what I mean: $arr[5] = ['a', 'a', 'b', 'b', 'c'] ; the array countDuplicates($arr); Representing the data in a bidimensionnal array, this would return: #cs ['a'][2] ['b'][2] ['c'][1] Of course this is a bit messy, but that's just for you to get the idea #ce I'm trying to achieve this to check whether yes or no an array has more or same amount of occurrences of a character than another array. Am I doing this the right way? Does such a function exist? Thanks for everything
  14. Hi, I'm wondering why my code snippet isn't working. I copied most of it from a script where it work's. Here is the code: #include <Constants.au3> Opt("TrayAutoPause", 0) ; no pause while click Opt("TrayMenuMode", 1) ; no exit and pause Opt("TrayOnEventMode", 1); While 1 Sleep(100) WEnd Exit #Region ### START Tray section Global $hIni = TrayCreateItem("open INI") TrayItemSetOnEvent (-1, "_INI") TrayCreateItem("") Global $hExit = TrayCreateItem("Exit") TrayItemSetOnEvent (-1, "_Quit") TraySetState(1) TraySetClick(16); INI and Exit with secondary click TraySetOnEvent( $TRAY_EVENT_PRIMARYDOUBLE, "_OpenPath" ); _OpenPath with primary double click #EndRegion ### END Tray section Func _OpenPath() $sPfad = @ScriptDir ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sPfad = ' & $sPfad & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $iDelimiterPfad = StringInStr($sPfad, "\", 0, -1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $iDelimiterPfad = ' & $iDelimiterPfad & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $sPfadHoeher = StringLeft($sPfad, $iDelimiterPfad) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sPfadHoeher = ' & $sPfadHoeher & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ShellExecute($sPfadHoeher) EndFunc Func _INI() ConsoleWrite("_INI" & @CRLF) Sleep(10) EndFunc Func _Quit() Exit EndFunc I can see the trayicon but there is nothing happening neither primary double click nor secondary click. What's wrong? Regards, Conrad
  15. Hi there. I'm testing this code: #include "WinHttp.au3" ; http://www.w3schools.com/php/demo_form_validation_escapechar.php $sUserName = "SomeUserName" $sEmail = "some.email@something.com" $sDomain = "www.w3schools.com" $sPage = "/php/demo_form_validation_escapechar.php" ; Data to send $sAdditionalData = "name=" & $sUserName & "&email=" & $sEmail ; Initialize and get session handle $hOpen = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hOpen = ' & $hOpen & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ; Get connection handle $hConnect = _WinHttpConnect($hOpen, $sDomain) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hConnect = ' & $hConnect & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ; Make a request $hRequest = _WinHttpOpenRequest($hConnect, "POST", $sPage) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hRequest = ' & $hRequest & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ; Send it. Specify additional data to send too. This is required by the Google API: $hSendRequest = _WinHttpSendRequest($hRequest, "Content-Type: application/x-www-form-urlencoded", $sAdditionalData) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hSendRequest = ' & $hSendRequest & @CRLF & '>Error code: ' & @error & @TAB & "@extended: " & @extended & @CRLF) ;### Debug Console ; Wait for the response $hReceiveResponse = _WinHttpReceiveResponse($hRequest) ; See what's returned Dim $sReturned If _WinHttpQueryDataAvailable($hRequest) Then ; if there is data Do $sReturned &= _WinHttpReadData($hRequest) Until @error EndIf ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; See what's returned ConsoleWrite("Returned: " & $sReturned & @CRLF) But sending a request fails. Console outputs this: >Running:(3.3.12.0) ... --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop @@ Debug(14) : $hOpen = 0x00000000007DF540 >Error code: 0 @@ Debug(18) : $hConnect = 0x00000000008271C0 >Error code: 0 @@ Debug(22) : $hRequest = 0x00000000008B88E0 >Error code: 0 @@ Debug(26) : $hSendRequest = 0 >Error code: 1 @extended: 0 Returned: +>17:00:18 AutoIt3.exe ended.rc:0 +>17:00:18 AutoIt3Wrapper Finished. >Exit code: 0    Time: 0.6003 I'm testing it at work. There, we always have to identify at a proxy to be allowed to go to internet. But requests via inet.au3 will work. Maybe our firewall will block the request? Any ideas? I don't have any possibilities to test at home, because of OSX. Regards, Conrad
  16. Having some issues here... I'm trying to pull two numbers from a .tab text file, and one from an internal control inside another program. The only field I can access is the static text control that the program, and when I'm trying to subtract the two to double-check my numbers, I'm getting extra decimals added in. I'm not sure where they're coming from. I've tried using Round() to drop it down to 2 places, in the current iteration I'm trying to use StringFormat to cut it down to 2 places, but every time I try it out, an extra 0.000000001 or so is added to the $vDifference variable. Here's my code (it's sloppy, forgive me - first attempt at GUIs as well). UPDATE: Solved. Melba is a genius, and I have no idea how to syntax.
  17. Hello, is there any way to achieve in current AutoIt versions old style looking FileSelectFolder, like in v.3.3.9.5? I can't operate on COMs, maybe anyone knows the way, has a code? It looked like this (attachement): I don't like new style, some features don't work for me properly.
  18. Is it possible to left pad a matched group? Here is my situation. I am working on a program to integrate inventory from my companies warehouse with our website. Our part numbers in our Warehouse inventory look like this: 1501895, 1000973, 5000165, 6000002, etc. On our website, these same numbers would look like this: 15-1895, 1-973,5-165, 6-02 My program monitors our warehouse inventory database for changes, and when a change is made it needs to find the matching item on our website. This is the code that I originally used: StringRegExpReplace($new_items[$i][0],"([1-9]{1,2})(0*)(\d{1,4})","$1-$3") However I noticed this does not work for numbers that match my last example. The last matched group needs to be zero padded if the number is less than 10. Does anyone have an idea of where to start for this? Is there a better way than how I have started?
  19. Anyway to easily enumerate all controls (i.e. control classes, instances, etc.) in a 3rd party app? A business app I'm working on has all of the controls with their own classes and correct instances, but I don't know of an easy way to target each control in a loop without manually inputting the control info.
  20. How do I convert this to autoit? I've seen people here post examples (Manko) of communicating with device drivers, but this is ridiculously complex! #define CODEMSG(_digitval) CTL_CODE(FILE_DEVICE_UNKNOWN,_digitval , METHOD_BUFFERED,\ FILE_READ_DATA | FILE_WRITE_DATA) #define CODE_VALUE 4094 //handle to driver HANDLE device = 0; char ret[1024]; WCHAR SendValue[512]; DWORD codeval, bytes; if( !strcmp(argv[i],"-p") ) { codeval = CODE_VALUE; i++; continue; } MultiByteToWideChar(CP_ACP, 0, argv[i], -1, SendValue, sizeof(SendValue)); DeviceIoControl(device, CODEMSG(codeval), SendValue, (wcslen(SendValue)+1)*2, &ret, sizeof(ret),&bytes,NULL); The farthest I've got is~ #Include <WinAPI.au3> $Handle = _LoadDriver() $Struc = DllStructCreate("char[1024];WCHAR[512];DWORD") DllStructSetData($Struc, 3, _WinAPI_MultiByteToWideChar("I have no idea what I'm doing" , 0, $MB_PRECOMPOSED , true)) MsgBox(0,"",DllStructGetPtr($Struc)) $ret = DllCall("kernel32.dll", "int", "DeviceIoControl", _ "dword", $Handle, _ "dword", DllStructGetPtr($Struc,3), _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "dword*", 0, _ "ptr", 0) Until I slowly started to realize I have absolutely no idea what I'm doing.
×