Leaderboard
Popular Content
Showing content with the highest reputation on 12/14/2017 in all areas
-
Problem with deleting the same duplicate
Xandy and one other reacted to JLogan3o13 for a topic
If you have the array already, and want just the unique items, why is _ArrayUnique not working for you?2 points -
Ooops, been a while since I used it. Point is still valid though, so I get an A for effort and a B for execution.1 point
-
Check\Uncheck Single RadioButton
antonioj84 reacted to JLogan3o13 for a topic
@antonioj84 did you not see that this thread is almost 8 years old? Please do not resurrect old threads, especially when you are not contributing anything to the original discussion.1 point -
Only skimming the code but _ArrayRemoveDuplicate is expecting an array and you are passing a string $aUrlregex1[$c]1 point
-
This following snippet will give you somethink to thing about: Local $CounterMovie = _XML_GetNodesCount($oXmlDoc, "/videodb/movie") For $iMovie_idx = 0 To $CounterMovie -1 $titel = _XML_GetValue($oXmlDoc, "/videodb/movie[" & $iMovie_idx & "]/title") _ArrayDisplay($titel,'$titel') $originaltitel = _XML_GetValue($oXmlDoc, "/videodb/movie[" & $iMovie_idx & "]/originaltitle") _ArrayDisplay(... $breite = _XML_GetValue($oXmlDoc, "/videodb/movie[" & $iMovie_idx & "]/fileinfo/streamdetails/video/width") _ArrayDisplay(... $hoehe = _XML_GetValue($oXmlDoc, "/videodb/movie[" & $iMovie_idx & "]/fileinfo/streamdetails/video/height") _ArrayDisplay(... $sprache = _XML_GetValue($oXmlDoc, "/videodb/movie[" & $iMovie_idx & "]/fileinfo/streamdetails/audio/language") _ArrayDisplay(... Next EDIT: I hope that I do not screw up something in XPath.1 point
-
Welcome to AutoIt and the forum! You have to use GUICtrlRead in a "GUI-loop" after GUIGetMsg. Example: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() GUICreate("Example", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1) $idFile = GUICtrlCreateInput("", 10, 35, 300, 20) Local $idBtn = GUICtrlCreateButton("Ok", 40, 75, 60, 20) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idBtn $sInput = GUICtrlRead($idFile) MsgBox(0, "", "Data entered: " & @CRLF & $sInput) EndSwitch WEnd EndFunc ;==>Example1 point
-
IF in a MsgBox?
Earthshine reacted to Malkey for a topic
This will work also. Local $str = '', $c1 = -1, $c2 = 0, $c3 = 9 ; Using Conditional operator (?:) See: "Language Reference - Operators", or, the "Ternary operator" in AutoIt help file. MsgBox(0, 'TEXT', _ ($c1 ? 'Some text and counter1 = ' & $c1 & @CRLF : '') & _ ($c2 ? 'Some text2 and counter2 = ' & $c2 & @CRLF : '') & _ ; Zero is false. Not zero is true. ($c3 ? 'Some text3 and counter3 = ' & $c3 & @CRLF : ''))1 point -
IF in a MsgBox?
Earthshine reacted to kylomas for a topic
Lonewolf_2016, You will need to construct the string outside of the message box testing for values to include...like Local $str = '', $c1 = 1, $c2 = 0, $c3 = 9 If $c1 > 0 Then $str &= 'Some text and counter = ' & $c1 & @CRLF If $c2 > 0 Then $str &= 'Some text2 and counter2 = ' & $c2 & @CRLF If $c3 > 0 Then $str &= 'Some text3 and counter3 = ' & $c3 & @CRLF MsgBox(0, 'TEXT', $str) kylomas1 point -
youtuber, Or do you mean this (combining two regexps)... $aWebAdress = "https://autoitscripttr.blogspot.com/atom.xml" $aGetNewConnect = Connections($aWebAdress) $aUrlregex1 = StringRegExp($aGetNewConnect, "(?i)href=(?:'|(?:"))([^'&]+)",3) ;$aUrlregex1 = StringRegExp($aGetNewConnect, "(?i)href='([^']+)",3) If isArray($aUrlregex1) then For $c = 0 to UBound($aUrlregex1)-1 ConsoleWrite($c & @CRLF) ConsoleWrite("Count Url : " & $aUrlregex1[$c] & @CRLF) Next EndIf ;~ $aUrlregex2 = StringRegExp($aGetNewConnect, "(?i)href="([^&]+)",3) ;~ If isArray($aUrlregex2) then ;~ For $c = 0 to UBound($aUrlregex2)-1 ;~ ConsoleWrite($c & @CRLF) ;~ ConsoleWrite("Count Url : " & $aUrlregex2[$c] & @CRLF) ;~ Next ;~ EndIf Func Connections($address) Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", $address, False) $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0") $oHTTP.SetRequestHeader("Accept-Language", "tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3") $oHTTP.Send() If @error Then ConsoleWrite("Line : " & @ScriptLineNumber & " Connect Error " & @CRLF) $oHTTP = 0 Return SetError(1) EndIf If $oHTTP.Status = 200 Then Local $sReceived = $oHTTP.ResponseText $oHTTP = Null Return $sReceived EndIf $oHTTP = Null Return -1 EndFunc kylomas1 point
-
youtuber, FYI, this : $UBoun = UBound($aUrlregex1) Or UBound($aUrlregex2) returns "true" , and this : For $c in $UBoun is to be used with objects/arrays The regex are good. Assuming that what you want to achieve is something like this, here is the correct working way : $aWebAdress = "https://autoitscripttr.blogspot.com/atom.xml" $aGetNewConnect = Connections($aWebAdress) $aUrlregex1 = StringRegExp($aGetNewConnect, "(?i)href='([^']+)",3) If isArray($aUrlregex1) then For $c = 0 to UBound($aUrlregex1)-1 ConsoleWrite($c & @CRLF) ConsoleWrite("Count Url : " & $aUrlregex1[$c] & @CRLF) Next EndIf $aUrlregex2 = StringRegExp($aGetNewConnect, "(?i)href="([^&]+)",3) If isArray($aUrlregex2) then For $c = 0 to UBound($aUrlregex2)-1 ConsoleWrite($c & @CRLF) ConsoleWrite("Count Url : " & $aUrlregex2[$c] & @CRLF) Next EndIf Func Connections($address) Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", $address, False) $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0") $oHTTP.SetRequestHeader("Accept-Language", "tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3") $oHTTP.Send() If @error Then ConsoleWrite("Line : " & @ScriptLineNumber & " Connect Error " & @CRLF) $oHTTP = 0 Return SetError(1) EndIf If $oHTTP.Status = 200 Then Local $sReceived = $oHTTP.ResponseText $oHTTP = Null Return $sReceived EndIf $oHTTP = Null Return -1 EndFunc1 point
-
Your mentioning of a batch file confused things a bit So that made me think you in fact want to stop a batch file.. of course autoit commands wont work in batch files. As for stopping the script, you can use a "hotkeyset" and direct to a function that exits the script, but there more ways of doing the same.1 point
-
MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.
t0nZ reacted to Miliardsto for a topic
u have these things included/declared before just find them and prevent to declare twice xd In sublime text 3 is option find in folder. Put folder with ur project and enter name of this global variable which u want to find. Then you will fast find where it is1 point -
Drive Mapping Issue
Echbiahn reacted to GoogleDude for a topic
Great find. I had basically the same issue for the last 2 weeks, drove me nuts. After finding this post my problem was resolved. Thanks for the post. ~GD1 point -
Check\Uncheck Single RadioButton
pixelsearch reacted to Melba23 for a topic
1905russell, A thought has just struck me - take a look at this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hRadio = GUICtrlCreateRadio("Single Radio", 10, 10, 100, 20) GUISetState() $fState = False While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hRadio $fState = Not $fState If $fState = False Then GUICtrlSetState($hRadio, $GUI_UNCHECKED) EndSwitch WEndNow you can have the "look" you wanted. M231 point