-
Posts
113 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
golfinhu's Achievements
Adventurer (3/7)
1
Reputation
-
IE get element without id or name
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
Thanks a lot 😃 -
IE get element without id or name
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
Hi, thanks for your reply. to I get all the elements I need to use the Documents.All, right? I will try it. -
Hi, Guys I'm trying to make a login in one website, but, in the textbox element don't have id, classname, and name. There's another way to get this element? I tried to use the id in the "tb-ted-id" attribute, but it doesn't work. Thanks. <input type="text" min="" max="" match-data="" placeholder="Username" title="Username" ng-disabled="disabled" ng-required="required" ng-model="textValue" ng-model-options="options || {}" ng-keydown="keydown({$event: $event})" tb-enter="modelCtrl.$commitViewValue(); onEnter({$event: $event}); triggerEnter()" ng-paste="onPaste()" tb-auto-select="autoSelect" tb-focus="focus" tabindex="0" tb-test-id="textbox-username-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" ng-trim="true" class="tb-text-box-input tb-enable-selection ng-not-empty ng-dirty ng-valid-parse ng-valid ng-valid-required ng-touched" name="username" required="required">
-
Regex101 different matching then Autoit?
golfinhu replied to BatMan22's topic in AutoIt General Help and Support
$preedit = "Cl K 0.0118 Wt % 7.91E-4 121.3 290.3 " $preedit = StringRegExpReplace($preedit, "^(.+?\d+\.\d+)", "") ; Delete Everything before numbers MsgBox(0,'',$preedit) try it. -
Hi, people, how are you? I'm trying to create an algorithm that passes conditional formulas from excel to Autoit, I was thinking of doing something recursive, but I'm not getting it. #include <Array.au3> $sString = '=IF(D15="NO",(-K6+(K6*K6-4*K5*K7)^(1/2))/(2*K5),IF(G9="BIG",G14,(-K6+(K6*K6-4*K5*K7)^(1/2))/(2*K5)))' MsgBox(0,'', _a($sString)) Func _a($sString) MsgBox(0, '', $sString) Local $sCondition = StringRegExp($sString, "IF\((.+?);", 3)[0] Local $aRight = StringRegExp($sString, "IF\(.+?;(.+)\)", 3) If StringLeft($aRight[0], 2) <> "IF" Then Return 0 Else Return _a($aRight[0]) EndIf EndFunc I wanted something like this: if $D15 = "NO" then (-$K6+($K6*$K6-4*$K5*$K7)^(1/2))/(2*$K5); elseif $G9 = 'BIG' then $G14 else (-$K6+($K6*$K6-4*$K5*$K7^(1/2/(2*$K5)))); Endif Remembering that you can have IF inside IF. Is there any simple way to do this? Thank you very much
-
Hi, ppl. I am developing a GUI with a fix sidebar, based on the style of windows 10 ... I have 3 problems at the moment. 1 - How do I put the close and minimize buttons on my window? (I want my window not to have the top bar). I tried to draw with gdi plus but I could not. 2 - My watch flashes when the time is updated. I tried to do with _GDIPlus_GraphicsDrawString but the strings get overlapped. 3 - I can not leave my transparent buttons to put them in the sidebar (as in this photo below) If anyone can help me I would appreciate it very much. thanks a lot GUI.au3
-
- label flashing
- metrogui
-
(and 2 more)
Tagged with:
-
Resize image loaded from memory (Base 64)
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
I had tried to do this, but I did it wrong! I fully understood the idea, thank you very much for helping me! -
Resize image loaded from memory (Base 64)
golfinhu posted a topic in AutoIt General Help and Support
Hi, ppl, fine? i'm using this example coded by UEZ to load image from memory! Here is the code i'm using: ;coded by UEZ 2011 #include <buttonconstants.au3> #include <guiconstantsex.au3> #include <gdiplus.au3> #include <memory.au3> _GDIPlus_Startup() ;~ Global Const $IMAGE_BITMAP = 0 Global Const $STM_SETIMAGE = 0x0172 Global $msg Global Const $hGUI = GUICreate("Example", 600, 250) Global Const $idLogo = GUICtrlCreatePic("", 215, 20, 169, 68) Global Const $Bmp_Logo = _GDIPlus_BitmapCreateFromMemory(AutoIt_Logo(), True) _WinAPI_DeleteObject(GUICtrlSendMsg($idLogo, $STM_SETIMAGE, $IMAGE_BITMAP, $Bmp_Logo)) GUISetState() While True $msg = GUIGetMsg() Switch $msg Case $idLogo MsgBox(0, "Information", "The picture has been clicked!") Case $GUI_EVENT_CLOSE _WinAPI_DeleteObject($Bmp_Logo) _GDIPlus_Shutdown() GUIDelete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zwDZ0A0AKTzQI+EL4AILDURifd3SEARA8gALTNAuwAkN8vMAEemg4Av9AFQ9AFZ/AACzywDVbQwy8AwA4sAAAZAAwAARAIWR3d8p0AMplgDWAALgAAwAL4PdnOIAwAy0AEII4ANMAAnwmu4AxuAkAA8NznU9gT/iYAslMNpAAEJoAAAT6Q4Rue3zgAnt8aDgAzLAAAKa7O89LYLS4AIlGdCdUQCAEAIAMmsA4Z4AMANQ4AUM7jPpAAAetgApv83C4AdAXsPOTAUuQAV6AKpPCsQLAAA8AgAGb+yZMA3GiBAORaLuQAXI4pi50JV/AA5aqgCk8KAqQAAAKBoArqfD4Ac66+Ev7mmNIA1HI+5+syRHMAIO4rgC7ojF4AEIp92IxddIoA3eiUXumWfukAmJ7pmr7pnB4AEAA7' $AutoIt_Logo = _Base64Decode($AutoIt_Logo) Local $tSource = DllStructCreate('byte[' & BinaryLen($AutoIt_Logo) & ']') DllStructSetData($tSource, 1, $AutoIt_Logo) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress) $tSource = 0 Return Binary(DllStructGetData($tDecompress, 1)) EndFunc ;==>AutoIt_Logo Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize = 0x800000) Local $tBuffer, $Ret $tOutput = 0 $tBuffer = DllStructCreate('byte[' & $iBufferSize & ']') If @error Then Return SetError(1, 0, 0) $Ret = DllCall('ntdll.dll', 'uint', 'RtlDecompressBuffer', 'ushort', 0x0002, 'ptr', DllStructGetPtr($tBuffer), 'ulong', $iBufferSize, 'ptr', DllStructGetPtr($tInput), 'ulong', DllStructGetSize($tInput), 'ulong*', 0) If @error Then Return SetError(2, 0, 0) If $Ret[0] Then Return SetError(3, $Ret[0], 0) $tOutput = DllStructCreate('byte[' & $Ret[6] & ']') If Not _WinAPI_MoveMemory(DllStructGetPtr($tOutput), DllStructGetPtr($tBuffer), $Ret[6]) Then $tOutput = 0 Return SetError(4, 0, 0) EndIf Return $Ret[6] EndFunc ;==>_WinAPI_LZNTDecompress Func _Base64Decode($input_string) Local $struct = DllStructCreate("int") Local $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $input_string, "int", 0, "int", 1, "ptr", 0, "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(1, 0, "") Local $a = DllStructCreate("byte[" & DllStructGetData($struct, 1) & "]") $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $input_string, "int", 0, "int", 1, "ptr", DllStructGetPtr($a), "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(2, 0, "") Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode What I would like to know is: In the new image, loaded from memory, is possible to set width and height? Because it don't "obey" the size parameters in the GUICtrlCreatePic... Thanks in advance. -
Notification: "Book needs to be renovated" in winhttp
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
anyone? =( -
Hello guys, okay? In my college I constantly forgot to renew my books, so I created a script with IE to tell me when I need to renew it in the system, however, I would like to do the code with winhttp, but Idk to work with winhttp... In fact, I do not know if you can do this with winhttp. I was able to login to the site using winhttp,I need to do after that is to follow the sequence of images: "click" in this button "Fechar" "click" in this buttons And finally get to the part that shows the date that I need to renew my books! In this part, we extract the data using regular expressions and everything is done! Could someone give me a "north" of how to do this? I use firefox extension to read winhttpheaders, but what I need to do to follow these steps? it's possible? if someone can help me I would greatly appreciate it Thank you very much
-
[SOLVED] - Excel - Get an array of cell colors
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
​it's work, thanks a lot!!! ​i understand, thanks a lot for you explanation and help! -
golfinhu reacted to a post in a topic: [SOLVED] - Excel - Get an array of cell colors
-
[SOLVED] - Excel - Get an array of cell colors
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
​Look my generic code: #include <Array.au3> $oExcel = ObjCreate("Excel.Application") With $oExcel ; open new workbook .Visible = True .WorkBooks.Add .ActiveWorkbook.Sheets(1).Select() EndWith $sRange ="A1:G8" With $oExcel.ActiveSheet.Range($sRange) .Select .HorizontalAlignment = -4108 ; center .ColumnWidth = 18 ;.EntireColumn.AutoFit EndWith ;Color Cells Local $n = 1 For $i = 1 To 7 For $j = 1 To 8 $oExcel.ActiveSheet.Range(Chr(64 + $i) & $j).Interior.ColorIndex = $n $oExcel.ActiveSheet.Range(Chr(64 + $i) & $j).value = "Color " & $n $n+=1 Next Next ;Array of cell values: Local $aValue = $oExcel.ActiveSheet.Range($sRange).value _ArrayDisplay($aValue) ;Array of cell colors: Local $aColors = $oExcel.ActiveSheet.Range($sRange).Interior.ColorIndex If Not IsArray($aColors) Then MsgBox(0,'','failed to get array colors') Else _ArrayDisplay($aValue) EndIf I can't get an color array like a data array! -
Hi all, fine? i need a little help! I need to get an array with the colors of the cells in the specified range! i've tried this, but don't work! Local $aCellColors = $oWorkbook.ActiveSheet.Usedrange.Columns("BK:BP").ColorIndex MsgBox(0,'',IsArray($aCellColors)) anyone help me? thanks a lot!
-
Hi All, good? i have one file with 500 coordinates to plot in google earth... I can create a google earth object using a code found here in the forum, but can not move to a new address, I searched the google earth api, but I can not work at all, does anyone have any idea how do that? thank you again #include-once #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <IE.au3> Dim $msg, $ge Global $main_gui ; Setup Main GUI $main_gui = GUICreate("Google Earth Example", 800, 600, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX)) $ge_ctrl = _GUICtrlGoogleEarth_Create($ge, "AIzaSyAEna-zqz5hUjbiuzAXXRoWtR04MN1hzaU", 0, 10, 800, 450, "Palm Beach, Queensland, Australia", 1000, 2) GUICtrlSetResizing($ge_ctrl, $GUI_DOCKTOP) $close_button = GUICtrlCreateButton("Close (Esc)", 650, 515, 80, 20) GUICtrlSetResizing(-1, $GUI_DOCKHCENTER) dim $main_gui_accel[1][2]=[["{ESC}", $close_button]] ; Show Main GUI GUISetState(@SW_SHOW) GUISetAccelerators($main_gui_accel) ; Main Loop while 1 If $msg = $GUI_EVENT_CLOSE or $msg = $close_button Then ExitLoop EndIf $msg = GUIGetMsg() WEnd GUIDelete() func _GUICtrlGoogleMap_GetLatLng($address) Local $latlng[2] $address_part = StringSplit($address, ",", 2) ; if the geocode is a lat long if UBound($address_part) = 2 and IsNumber($address_part[0]) and IsNumber($address_part[1]) Then $latlng[0] = StringStripWS($address_part[0], 3) $latlng[1] = StringStripWS($address_part[1], 3) Else $s_Response = BinaryToString(InetRead("http://maps.googleapis.com/maps/api/geocode/json?address=" & _URIEncode($address), 1)) $latlng = StringRegExp($s_Response, '(?s)"location" .+?"lat"\s*:\s*(-?\d+\.\d+).+? "lng"\s*:\s*(-?\d+\.\d+)', 3) EndIf Return $latlng EndFunc Func _URIEncode($sData) Local $aData = StringSplit(BinaryToString(StringToBinary($sData, 4), 1), "") Local $nChar $sData = "" For $i = 1 To $aData[0] $nChar = Asc($aData[$i]) Switch $nChar Case 45, 46, 48 To 57, 65 To 90, 95, 97 To 122, 126 $sData &= $aData[$i] Case 32 $sData &= "+" Case Else $sData &= "%" & Hex($nChar, 2) EndSwitch Next Return $sData EndFunc ;==>_URIEncode ; #FUNCTION# ;=============================================================================== ; ; Name...........: _GUICtrlGoogleEarth_Create() ; Description ...: Creates a Google Map control. ; Syntax.........: _GUICtrlGoogleEarth_Create(ByRef $ge, $gmap_api_key, $left, $top, $width, $height, $address, $zoom = 10000, $fly_to_speed = "ge.SPEED_TELEPORT") ; Parameters ....: $ge - The embedded Google Earth object, required by the _GUICtrlGoogleEarth functions below. ; $gmap_api_key - A valid Google Maps API key (see Remarks below). ; $left - The left side of the control. ; $top - The top of the control. ; $width - The width of the control. ; $height - The height of the control. ; $address - An address (either a location or latitude and longitude) to center the map on ; ie. both "Sydney, New South Wales, Australia" and "-34.397, 150.644" are valid. ; $zoom - An initial map zoom level (in meters). ; $fly_to_speed - The speed to move to the above address. ; The range is 0.0 to 5.0. ; Using "ge.SPEED_TELEPORT" will move instantly. ; Return values .: On Success - Returns the identifier (controlID) of the new control. ; On Failure - Returns False. ; Author ........: seangriffin ; Modified.......: ; Remarks .......: The Google Earth Plug-in must be installed in your Internet Explorer browser ; prior to using this function. To install the plugin, using ; Internet Explorer visit "http://code.google.com/apis/earth" and follow ; the instructions provided. ; ; A Google Maps API key is also required for this function to work. ; You must obtain your own personal key from Google, and pass it into this ; function for it to work. To obtain a key, visit ; "http://code.google.com/apis/maps/signup.html", and when prompted for ; your web site URL, supply the URL of "http://localhost". You will ; also be asked to sign in with your Google Account details. ; Related .......: ; Link ..........: ; Example .......: Yes ; ; ;========================================================================================== func _GUICtrlGoogleEarth_Create(ByRef $ge, $gmap_api_key, $left, $top, $width, $height, $address, $zoom = 10000, $fly_to_speed = "ge.SPEED_TELEPORT") Local $latlng[2] $latlng = _GUICtrlGoogleMap_GetLatLng($address) Local Const $html = _ "<html>" & @CRLF & _ "<head>" & @CRLF & _ " <title>Sample</title>" & @CRLF & _ " <script src=""http://www.google.com/jsapi?key=" & $gmap_api_key & """> </script>" & @CRLF & _ " <script type=""text/javascript"">" & @CRLF & _ " var ge;" & @CRLF & _ " google.load(""earth"", ""1"");" & @CRLF & _ " function init() {" & @CRLF & _ " google.earth.createInstance('map3d', initCB, failureCB);" & @CRLF & _ " }" & @CRLF & _ " function initCB(instance) {" & @CRLF & _ " ge = instance;" & @CRLF & _ " ge.getWindow().setVisibility(true);" & @CRLF & _ " ge.getOptions().setFlyToSpeed(" & $fly_to_speed & ");" & @CRLF & _ " var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);" & @CRLF & _ " lookAt.setLatitude(" & $latlng[0] & ");" & @CRLF & _ " lookAt.setLongitude(" & $latlng[1] & ");" & @CRLF & _ " lookAt.setRange(" & $zoom & ");" & @CRLF & _ " ge.getView().setAbstractView(lookAt);" & @CRLF & _ " }" & @CRLF & _ " function failureCB(errorCode) {" & @CRLF & _ " }" & @CRLF & _ " google.setOnLoadCallback(init);" & @CRLF & _ " </script>" & @CRLF & _ "</head>" & @CRLF & _ "<body style=""margin:0px; padding:0px;"">" & @CRLF & _ " <div id=""map3d"" style=""width:100%; height:100%""></div>" & @CRLF & _ "</body>" & @CRLF & _ "</html>" $ge = _IECreateEmbedded () $ge_ctrl = GUICtrlCreateObj($ge, $left, $top, $width, $height) _IENavigate($ge, "about:blank") _IEDocWriteHTML($ge, $html) $ge.refresh() _IELoadWait($ge) $ge.document.body.scroll = "no" Return $ge_ctrl EndFunc
-
convert address to lat lng (google maps)
golfinhu replied to golfinhu's topic in AutoIt General Help and Support
Oh! Now I saw that you had put an example, I am very grateful for the help, I'll take a look at this api and try to use it, thank you for the help!