-
Posts
17 -
Joined
-
Last visited
Everything posted by Maintel
-
Can't automate <input type=file ... > tag in IE
Maintel replied to JadeGolem's topic in AutoIt General Help and Support
This is an old thread, but google will find it when people search about this problem, so here is my solution. Script will hang until "Choose File to Upload" dialog is open, so you can not write any text. Solution to this problem is to create second AutoIt script, you can start and stop it from your main script, or just start it manually. You can pass the path to file via Clipboard, create some Label in GUI, write it to file etc etc. Passing variable from main script $oForm = _IEFormGetObjByName($oIE, "form_ID") ... _ClipBoard_SetData("c:\example.jpg") $oFormSelectFile = _IEFormElementGetObjByName($oForm, "open_file_element_ID") _IEAction($oFormSelectFile, "click") Second script #include <Clipboard.au3> While 1 $handle = WinWait("Choose File to Upload") Sleep(300) $file = _ClipBoard_GetData() ControlSend($handle, '', 'Edit1', $file & '{ENTER}') Sleep(300) WEnd -
SciTE4AutoIt3 has now turned on ClearType :((
Maintel replied to Maintel's topic in AutoIt General Help and Support
worked, thanks. -
SciTE4AutoIt3 has now turned on ClearType :((
Maintel replied to Maintel's topic in AutoIt General Help and Support
I have no SciTEUser.properties and when I created it in Scite folder it not worked, but I added it at the end of SciTEGlobal.properties and it worked. thanks! -
SciTE4AutoIt3 has now turned on ClearType :((
Maintel replied to Maintel's topic in AutoIt General Help and Support
This is not about font, font is same as before - Courier New, but now it is antialiased = less pleasant for eyes. -
AutoIt can not get new url changed by JS
Maintel replied to Maintel's topic in AutoIt General Help and Support
Ok solved by Sleep('100') Looks like _IELoadWait called automatically by _IELinkClickByText is not working in this case. -
Hello with autoit I can not get URL of $oIE = _IECreateEmbedded() Site is loaded, I do few clicks with AutoIt etc, then I click on a href (_IELinkClickByText), which started a JavaScript, the page is loaded, but I'm still getting the old URL with: $frameFrameContent = _IEFrameGetObjByName($oIE, 'FrameContent') $frameUrl = _IEPropertyGet($frameFrameContent, 'locationurl')In fact I need get the content of that frame, but it is also not working, I think I'm also getting the html from the previous step in browsing: $urldata = _IEDocReadHTML($frameFrameContent) So how to refresh, or what I need to do, to get the actual frame url and html? this is the JS used to change the URL in that frame: dlg = "DlgCtrCarSelection"; process = "CarSelection"; top.FrameContent.location.href=baseUrl+'?dlg='+dlg+'&action=Enter&process='+process+'&loop=true';
-
Ping is not working when VPN is on
Maintel replied to Maintel's topic in AutoIt General Help and Support
Code? I simple used "ping" command... For example I tried it now with code from Help, still error 2 on VPN. #include <MsgBoxConstants.au3> $iPing = Ping("autoitscript.com", 250) If $iPing Then ; If a value greater than 0 was returned then display the following message. MsgBox($MB_SYSTEMMODAL, "", "The roundtrip-time took: " & $iPing & "ms.") Else MsgBox($MB_SYSTEMMODAL, "", "An error occurred with @error value of: " & @error) EndIf -
As most of the visitors, I simple went to http://www.autoitscript.com/site/autoit/downloads/ and downloaded Latest version: v3.3.10.2 and inside is SciTE in version Version 3.2.0, so put in all in one download package SciTE 3.3.7 will be a good idea. Ok I got the folder AutoIt3Aut2ExeIcons
-
Hello when I turn on VPN, the Ping command is returning error #2, but of course from command prompt it is working. This is problem with Ping command? Maybe he need to always recheck routing table what network adapter it should use? thx
-
I have same problem, after I upgraded to latest AutoIt the file version and file description is not working, icon is working. This is from compilation: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "F:\HDD\vcds.au3" +>14:08:17 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 +>14:08:17 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe /in "F:\HDD\vcds.au3" /out "F:\HDD\vcds.exe" /nopack /icon "F:\HDD\vcds.ico" /comp 2 +>14:08:18 Aut2exe.exe ended.rc:0 >14:08:18 Performing the Program Resource Update steps: !>14:08:18 Error: Failed to get script data from end of target file. Skipping resource update.rc:2 +>14:08:18 Created program:F:\HDD\vcds.exe >Exit code: 0 Time: 2.237 The non-touched source code compiled with previous version did this correctly. In source code I have this, it's created by Tools->Compile #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=vcds.ico #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** I also noticed the .exe files have no more the default autoit icon...
-
Function to dynamically format (file) size to kB/MB/GB/TB: Func FormatFileSize($iSizeInBytes) Local $iSize, $i $iSize = $iSizeInBytes $i = 0 While $iSize >= 1024 ;split value, you can set lower number like 900 for earlier switch (0.98 MB) $iSize /= 1024 ;this must be always 1024 $i += 1 WEnd $iSize = Round($iSize, 1) & " "; enter how many decimals you want, here it's '1' Switch $i Case 1 $iSize = $iSize & "k" Case 2 $iSize = $iSize & "M" Case 3 $iSize = $iSize & "G" Case 4 $iSize = $iSize & "T" EndSwitch Return $iSize & "B" EndFunc
-
Same source code not work with new AutoIt
Maintel replied to Maintel's topic in AutoIt General Help and Support
Thanks guys -
Hi I have .exe compiled with 3.3.0.0, then I re-compiled it with 3.3.6.1 and .exe stop at this point of code: If WinWaitActive("Windowstitle","text text text text",3) = 1 Then Send("keypress{ENTER}") EndIf and without touching anything in code 3.3.0.0 build work and 3.3.6.1 can't send the 'keypress' text
-
Problem with TrayGetMsn and Sleep
Maintel replied to Maintel's topic in AutoIt General Help and Support
Well yes... I change it to 25.... Anyway I like to know why delay for example 200 (miliseconds) slow down reaction for menu item to 5 seconds? Program's bug or nature of TrayGetMsg? -
Problem with TrayGetMsn and Sleep
Maintel replied to Maintel's topic in AutoIt General Help and Support
Try it by yourself, Sleep in TrayGetMsg loop make significant delays in executing of menu items Because I have in loop $list = WinList() and I'm waiting to showing up of severals windows, I need slow this loop because it use 99% of processor. But then here is the problem with slow reaction. You can simulate it with this simple code (it's from Help file): #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1); Default tray menu items (Script Paused/Exit) will not be shown. $settingsitem = TrayCreateMenu("Settings") $displayitem = TrayCreateItem("Display", $settingsitem) $printeritem = TrayCreateItem("Printer", $settingsitem) TrayCreateItem("") $aboutitem = TrayCreateItem("About") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $aboutitem Msgbox(64,"About:","AutoIt3-Tray-sample") Case $msg = $exititem ExitLoop EndSelect Sleep(200) WEnd Exit -
Hi I have something like this ........ While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $aboutitem Msgbox(64, "About", "AKTE Auto Updater v2.1 by Krosik"& @LF & @LF &"www.vw-club.cz") Case $msg = $exititem ExitLoop EndSelect sleep(200) WEnd Without Sleep it take about 80% of processor so I must add Sleep. Problem is, that with Sleep command, when I click on Exit or About in Menu, it take 2-4 seconds until this command execute. Is this natural of Sleep and TrayGetMsg command or it's a bug? How can I have while cycle with monitoring of TrayGetMsg but without draining processor resources? thanks