-
Posts
35 -
Joined
-
Last visited
Profile Information
-
WWW
http://absoft.site88.net
Recent Profile Visitors
196 profile views
libreau3's Achievements
-
loop never end even if true
libreau3 replied to deviprasad's topic in AutoIt General Help and Support
Please mark as answered! -
loop never end even if true
libreau3 replied to deviprasad's topic in AutoIt General Help and Support
From the help doc Some controls will resist automation unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlCommand() on these controls. -
kcvinu reacted to a post in a topic: Where i can get the SciTE4 AutoIt3 's icon
-
Where i can get the SciTE4 AutoIt3 's icon
libreau3 replied to kcvinu's topic in AutoIt General Help and Support
I think you might need permission to use it, but if you ask a mod I am sure they can help. -
Where i can get the SciTE4 AutoIt3 's icon
libreau3 replied to kcvinu's topic in AutoIt General Help and Support
Why do you need it? -
You could do something like this #include <Misc.au3> #include <ScreenCapture.au3> $temp = @TempDir& "\temp.jpg" _ScreenCapture_CaptureWnd($temp,"Window to get the image from",'left','top','right', 'bottum') _ClipPutFile(@TempDir& "\temp.jpg") FileDelete($temp) I hope this helps.
-
libreau3 reacted to a post in a topic: Regular express to array
-
You could do something like this #include <Array.au3> $str = '11:05:40.839855 T2708 DBG Feat stats, sensor 78: BG, p=2000: c=10: 100%.' $array = StringSplit($str," ", 2) Then the remove the unnecessary characters individually and remove the extra elements with _ArrayDelete().
-
With winhttp do you login to facebook?
libreau3 replied to Burak's topic in AutoIt General Help and Support
Here this may help you <snip> Please Note that I am not promoting game bots and if that is the reason for post here note that it is against the rules. Good Luck. -
Try using an array with the _ArrayShuffle() function then assigning each value to an input. to slow
-
Jos reacted to a post in a topic: Custom PDF Page Sizes
-
Hello all I am trying to create img2pdf program using The >MPDF UDF. The base of my code is dirived from the img2pdf example. I can make the image itself the a custom size but not the page itself. Any ideas? #include "..\MPDF_UDF.au3" _SelectImages() Func _SelectImages() Local $var = FileOpenDialog("Select images", @ScriptDir & "\", "Images (*.jpg;*.bmp;*gif;*png;*tif;*ico)", 4) If @error Then MsgBox(4096, "", "No File(s) chosen") Else Local $aImgs = StringSplit($var, "|", 3) Dim $cHeight[1] $cHeight[0] = 0 Dim $cWidth[1] $cWidth[0] = 0 _GDIPlus_Startup() For $i = 1 To UBound($aImgs) - 1 $oGdi = _GDIPlus_ImageLoadFromFile($aImgs[0] & "\" & $aImgs[$i]) If @error Then MsgBox(0, "Error", @error) Exit EndIf _ArrayAdd($cWidth, _GDIPlus_ImageGetWidth($oGdi)) _ArrayAdd($cHeight, _GDIPlus_ImageGetHeight($oGdi)) Next _GDIPlus_Shutdown() _OpenAfter(True);open after generation _SetUnit($PDF_UNIT_PT) _SetZoomMode($PDF_ZOOM_CUSTOM, 90) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ;initialize the pdf _InitPDF(@ScriptDir & "\Image2PDF.pdf") If UBound($aImgs) <> 1 Then ;=== load resources used in pdf === For $i = 1 To UBound($aImgs) - 1 _LoadResImage("img" & $i, $aImgs[0] & "\" & $aImgs[$i]) Next ;load each image on it's own page For $i = 1 To UBound($aImgs) - 1 _SetPaperSize("CUSTOM",$cWidth[$i],$cHeight[$i]) _BeginPage() _InsertImage("img" & $i, 0, 0,$cWidth[$i], $cHeight[$i]) _EndPage() Next Else _LoadResImage("taietel", $aImgs[0]) _BeginPage() ;scale image to paper size! _InsertImage("taietel", 0, 0, _GetPageWidth() / _GetUnit(), _GetPageHeight() / _GetUnit()) _EndPage() EndIf ;then, finally, write the buffer to disk _ClosePDFFile() EndIf EndFunc ;==>_SelectImages ps I have included the my source the udf and the images I am using to test it. Img2Pdf.zip
-
If I understand the help document correctly this is what you are looking for https://www.autoitscript.com/autoit3/docs/functions/HttpSetProxy.htm . Just make sure to HttpSetProxy(1) at the end of your script to turn of the proxy.
-
Thanks Everyone for the help.
-
Hello all I was wondering if AutoIT is able to create a numbered edit control like SciTE.
-
_IEDocReadHTML is not returning HTML
libreau3 replied to libreau3's topic in AutoIt General Help and Support
I figured out what my issues was. _IEDocReadHTML was returning something slightly different the what Chrome's Inspect Element was. -
_IEDocReadHTML is not returning HTML
libreau3 replied to libreau3's topic in AutoIt General Help and Support
My bad I posted the wrong segment of code. #include <File.au3> #include <IE.au3> #include <Array.au3> #include <Date.au3> #include <String.au3> SplashTextOn("", "Please Wait!", 200, 50) Local $oIE = _IECreate("https://www.msiwebbooking.com/production/default.aspx?id=eb737f64-5b38-496b-b1eb-00f5d2715e92") $checkAvail = _IEGetObjById($oIE, "ctl00_ContentPlaceHolder1_ImageButton4") _IEAction($checkAvail, "click") Sleep(3000) $load = _IELoadWait($oIE) Local $sHTML = _IEDocReadHTML($oIE) FileWrite(@DesktopDir & "\Temp.html", $sHTML) _IEQuit($oIE) $html = 0 _FileReadToArray(@DesktopDir & "\temp.html", $html) Global $span For $I = 0 To UBound($html) - 1 If StringInStr($html[$I], '<span id="ctl00_ContentPlaceHolder1_ctl05_lblRoomRateValue" class="accordionText">') Then ConsoleWrite($html[$I]) $temp = _StringBetween($html[$I], '<span id="ctl00_ContentPlaceHolder1_ctl05_lblRoomRateValue" class="accordionText">', '</span>') $span &= $temp[0] & "|" ConsoleWrite($temp[0]& @CRLF) Else ContinueLoop EndIf Next $span = StringSplit($span, "|", 2) _ArraySort($span) _ArrayDisplay($span) FileDelete(@DesktopDir & "\temp.html") If IsArray($span) = 0 Or UBound($span) < 2 Then IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Min", "Sold Out") IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Max", "Sold Out" & @CRLF) Else IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Min", $span[1]) IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Max", $span[UBound($span) - 1] & @CRLF) EndIf $span = "" ;~ ;Clean Up SplashOff() ShellExecute(@DesktopDir & "\hotel.ini") WinWaitActive("hotel.ini - Notepad", "") WinSetState("hotel.ini - Notepad", "", @SW_MAXIMIZE) WinWaitClose("hotel.ini - Notepad", "") FileDelete(@DesktopDir & "\hotel.ini") -
Hello All I am attempt ting to retrieve the rates for a particular hotel, but after creating the IE object and clicking the search button I can not retrieve the the html. _IEDocReadHtml() is setting the @error to 0. Does anyone know why this is happening? #include <File.au3> #include <IE.au3> #include <Array.au3> #include <Date.au3> #include <String.au3> SplashTextOn("", "Please Wait!", 200, 50) Local $oIE = _IECreate("http://book.bestwestern.com/bestwestern/US/PA/Carbondale-hotels/BEST-WESTERN-Pioneer-Plaza/Hotel-Overview.do?propertyCode=39127") Local $checkAvail = _IEGetObjById($oIE, "searchBtn") _IEAction($checkAvail, "click") _IELoadWait($oIE) Local $sHTML = _IEDocReadHTML($oIE) FileWrite(@DesktopDir & "\Temp.html", $sHTML) _IEQuit($oIE) $html = "" _FileReadToArray(@DesktopDir & "\temp.html", $html) Global $span For $I = 0 To UBound($html) - 1 If StringInStr($html[$I], '<span class="currencyRateDisplay">') Then ConsoleWrite($html[$I]) $temp = _StringBetween($html[$I], '<span class="currencyRateDisplay">', '</span>') $span &= $temp[0] & "|" ConsoleWrite($temp[0]& @CRLF) Else ContinueLoop EndIf Next $span = StringSplit($span, "|", 2) _ArraySort($span) _ArrayDisplay($span) FileDelete(@DesktopDir & "\temp.html") If IsArray($span) = 0 Or UBound($span) < 2 Then IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Min", "Sold Out") IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Max", "Sold Out" & @CRLF) Else IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Min", $span[1]) IniWrite(@DesktopDir & "\hotel.ini", "Nicholas Village Clarks Summit", "Max", $span[UBound($span) - 1] & @CRLF) EndIf $span = "" ;~ ;Clean Up SplashOff() ShellExecute(@DesktopDir & "\hotel.ini") WinWaitActive("hotel.ini - Notepad", "") WinSetState("hotel.ini - Notepad", "", @SW_MAXIMIZE) WinWaitClose("hotel.ini - Notepad", "") FileDelete(@DesktopDir & "\hotel.ini")