-
Posts
520 -
Joined
-
Last visited
-
Days Won
2
Luigi last won the day on December 14 2016
Luigi had the most liked content!
About Luigi
- Birthday 02/08/1974
Recent Profile Visitors
905 profile views
Luigi's Achievements
-
KeeperOfTheReaper reacted to a post in a topic: AutoUpdate
-
Luigi reacted to a post in a topic: REGEX in SQLite
-
Greetings, Now there are many options to handle a browser, but, there are a best to automatize a SAP 7.x? Recently I use webdriver on AutoIt, but not work. Perhaps my error, so many iframes. Some one use automation on SAP? Can you give a advice? Best regards.
-
Greetings, I need build in C#, a constant class, with some values. This values used in all classes, and share the values in DLL. Somene can share an example? Build one class, and use in all cases? Best regards.
-
Luigi reacted to a post in a topic: Translate PYTHON's code to AUTOIT
-
Greetings, Someone can help-me to translate this Python's code to AutoIt? Python (source: https://repl.it/repls/InstructiveDarkslategreyJackrabbit) str = 'age=12,name=bob,hobbies="games,reading",phrase="I\'m cool!"' key = "" val = "" dict = {} parse_string = False parse_key = True # parse_val = False for c in str: print(c) if c == '"' and not parse_string: parse_string = True continue elif c == '"' and parse_string: parse_string = False continue if parse_string: val += c continue if c == ',': # terminate entry dict[key] = val #add to dict key = "" val = "" parse_key = True continue elif c == '=' and parse_key: parse_key = False elif parse_key: key += c else: val+=c dict[key] = val print(dict.items()) Python's output: [('phrase', "I'm cool!"), ('age', '12'), ('name', 'bob'), ('hobbies', 'games,reading')] AutoIt #include-once #include <Array.au3> #include <StringConstants.au3> Global $opt $opt = "estado = """" , cep = """", idade=32, nome = ""Luismar"", campo=""campo = campo""" $opt = "age=12,name=bob,hobbies=""games,reading"",phrase=""I\'m cool!""" ConsoleWrite($opt & @LF) Local $arr = StringSplit($opt, "", $STR_CHRSPLIT) Local $key = "" Local $val = "" Local $dict = ObjCreate("Scripting.Dictionary") Local $parse_string = False Local $parse_key = True Local $c For $ii = 1 To $arr[0] $c = $arr[$ii] If $c == '"' And Not $parse_string Then $parse_string = True ContinueLoop ElseIf $c == """" And $parse_string Then $parse_string = False ContinueLoop EndIf If $parse_string Then $val &= $c ContinueLoop EndIf If $c = "," Then $dict.Add($key, $val) $key = "" $val = "" $parse_key = True ContinueLoop ElseIf $c == "=" And $parse_key Then $parse_key = False ElseIf $parse_key Then $key &= $c Else $val &= $c EndIf Next $dict.Add($key, $val) ; missing this line... For $each In $dict ConsoleWrite($each & " = " & $dict.Item($each) & @LF) Next AutoIt's output age=12,name=bob,hobbies="games,reading",phrase="I\'m cool!" age = 12 name = bob hobbies = games,reading Best regards.
-
Is it possible to get DOM object without browser?
Luigi replied to Vitaliy4us's topic in AutoIt General Help and Support
CURL + XIDEL + XPATH = HAPPY END -
Greetings, (sorry my english) I cannot to minimize a secondary GUI. How do it? I need SLAVE's GUI to be a MASTER's parent. Two buttons on task bar is not good. #1 Line 63 ;$SLAVE = GUICreate($aSLAVE[0], $aSLAVE[1], $aSLAVE[2], -1, -1, -1, -1, $MASTER) Line 64 $SLAVE = GUICreate($aSLAVE[0], $aSLAVE[1], $aSLAVE[2]) In this case, if you click button SLAVE on task bar, minimize MASTER and SLAVE. I want minimize everything. But I want show only one button: MASTER. #2 Line 63 $SLAVE = GUICreate($aSLAVE[0], $aSLAVE[1], $aSLAVE[2], -1, -1, -1, -1, $MASTER) Line 64 ;$SLAVE = GUICreate($aSLAVE[0], $aSLAVE[1], $aSLAVE[2]) In this case, if you click button MASTER, minimize not work. But, SLAVE is a parent's MASTER. I want this. Question: How do make a SLAVE's gui be a MASTER's parent? And click on SLAVE and minimize both? Best regards. temp_001.au3
-
Danyfirex reacted to a post in a topic: Help with group's regex
-
I update for: Local $aReg=StringRegExp($String,"\b(?!(end|start))\w+\b",3) Work fine. Thank you @Danyfirex
-
Luigi reacted to a post in a topic: Help with group's regex
-
So sorry @Danyfirex... I forgot write something... It was completed...
-
Greetings, Someone can help-me with this regex? start1 a,b,c aaa,bbb,ccc dd,ee,ff a1,a2,a3 b1,b2,b3 c1,c2,c3 end1 start2 aa,bb,cc dd,ee,ff a1,a2,a3 b1,b2,b3 c1,c2,c3 end2 Obs: have multiples start? - end? each block have 3 words, each word have numbers, latters with any lenght Need catch an array $arr1 = ["a", "b", "c", "aaa", "bbb", "ccc", "dd", "ee", "ff", "a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"] $arr2 = ["aa", "bb", "cc", "dd", "ee", "ff", "a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"] Best regards. This is not clever... But resolve with 2 regex... Is possible solve this with one regex? Local $regex1 = "(?s)start1(.*?)end1" Local $regex2 = "\w+" Local $raw_antes = " start1 aa,bb,cc dd,ee,ff g,h,i @ end1 " Local $arr = StringRegExp($raw_antes, $regex1, 3) If IsArray($arr) Then $arr = $arr[0] ConsoleWrite("@Ok1" & @LF) $arr = StringRegExp($arr, $regex2, 3) If IsArray($arr) Then For $ii = 0 To UBound($arr, 1) - 1 Step 3 ConsoleWrite($arr[$ii] & ", " & $arr[$ii + 1] & ", " & $arr[$ii + 2] & @LF) Next Else ConsoleWrite("@Erro2" & @LF) EndIf Else ConsoleWrite("@Erro1" & @LF) EndIf
-
coffeeturtle reacted to a post in a topic: AutoUpdate
-
Skeletor reacted to a post in a topic: AutoUpdate
-
Luigi changed their profile photo
-
scape special characters in ms-dos
Luigi replied to Luigi's topic in AutoIt General Help and Support
Thankyou @pixelsearch, I will try. I unknow about chr(34)- 3 replies
-
- command line
- special characters
-
(and 3 more)
Tagged with:
-
Greetings, I need write a command line to run an .exe with parameters, one this parameters is a password with special characters like: [ ] \ " etc. The password is write between double cotes too. When run this command line, catch error. I buid this function, sometimes run ok, others show error. Someone can any idea? Best ragards #include <Array.au3> Global $G_AIX_DEFAULT_PASSWORD = "******" Func Scape_Word_To_MSDOS($var = "") ;~ https://www.robvanderwoude.com/escapechars.php Local $aCharacters[][2] = [ _ ["%", "%%"], _ ["^", "^^"], _ ["&", "^&"], _ ["<", "^<"], _ [">", "^>"], _ ["|", "^|"], _ ["'", "^'"], _ ["`", "^`"], _ [",", "^,"], _ [";", "^;"], _ ["=", "^="], _ ["(", "^("], _ [")", "^)"], _ ["!", "^^!"], _ ["\", "\\"], _ ["[", "\["], _ ["]", "\]"], _ ['"', '\"""'], _ [".", "\."], _ ["*", "\*"], _ ["?", "\?"] _ ] Local $iSearch $var = StringSplit($var, "", $STR_NOCOUNT) Local $iSize = UBound($var, $UBOUND_ROWS) - 1 For $ii = 0 To $iSize $iSearch = _ArraySearch($aCharacters, $var[$ii]) If $iSearch >= 0 Then $var[$ii] = $aCharacters[$iSearch][1] Next Return _ArrayToString($var, "") EndFunc ;==>Scape_Word_To_MSDOS Local $password = "-Dk5iFB2UjOt[-x|""" & "" Local $password_scape = Scape_Word_To_MSDOS($password) ConsoleWrite("[" & $password & "]" & @LF) ConsoleWrite("[" & $password_scape & "]" & @LF)
- 3 replies
-
- command line
- special characters
-
(and 3 more)
Tagged with:
-
Greetings... Yes... I know... Have a lot fo autoupdate's scripts... But I made one with two special options, not writed yet... self-update (ok) self install from any location (ok) run only in work folder (ok) check self version from repository (not ready) update all dependents files and check md5 file and/or version (not ready) work with remote drive (mount/unmount) (not ready) Tips... Create a folder: C:\Repository Save the scripts in folder C:\Repository Compile app.au3 Run from C:\Repository Close app.exe Copy to another folder... Run app.exe Recompile app.exe again... Re-run app.exe again... The script always run from C:\ProgramData\Luigi\app.exe... with the last version... AutoUpdate.au3 app.au3
-
Letraindusoir reacted to a post in a topic: Issue on drag a treeview's item from one to another
-
A simple function to print a DllStruct on AutoIt. #include <StringConstants.au3> #include <Array.au3> Func DllStructPrint($str, $tag) Local $ret = "" If IsDllStruct($str) Then $tag = StringLower($tag) Local $arr1, $arr2 $arr1 = StringSplit($tag, ";", $STR_NOCOUNT) Local $aLabel[1] For $ii = 0 To UBound($arr1, 1) - 1 If Not ($arr1[$ii] = "struct") And Not ($arr1[$ii] = "endstruct") Then $arr2 = StringSplit($arr1[$ii], " ", $STR_NOCOUNT) If IsArray($arr2) Then _ArrayAdd($aLabel, $arr2[1]) EndIf Next For $ii = 1 To UBound($aLabel, 1) - 1 $ret &= $aLabel[$ii] & "=" & DllStructGetData($str, $aLabel[$ii]) Next ElseIf IsArray($str) Then $ret &= "[" & @LF Local $iSize = UBound($str, 1) - 1 For $ii = 0 To $iSize $ret &= " " & DllStructPrint($str[$ii], $tag) & ($ii = $iSize ? "" : ",") & @LF Next $ret &= "]" & @LF EndIf Return $ret EndFunc ;==>DllStructPrint Local $tag = "Struct;byte key;EndStruct" Local $str1 = DllStructCreate($tag) $str1.key = Random(100, 999) Local $str2 = DllStructCreate($tag) $str2.key = Random(100, 999) Local $str3 = DllStructCreate($tag) $str3.key = Random(100, 999) Local $arr[2] $arr[0] = $str2 $arr[1] = $str3 Local $var1 = DllStructPrint($str1, $tag) ConsoleWrite($var1 & @LF) Local $var2 = DllStructPrint($arr, $tag) ConsoleWrite($var2 & @LF) OUTPUT: key=189 [ key=155, key=62 ]
-
I found an example here: https://www.c-sharpcorner.com/uploadfile/tanmayit08/how-you-make-a-dll-file-which-contains-the-icon-set-like-shell32-dll/ Works fine with Microsoft Visual Studio 2017.
-
Greetings, If you open this example: C:\Program Files (x86)\AutoIt3\Examples\GUI\Advanced\enumicons.au3 You start a script and it, load a image (icon) from a dll. Is possible build a dll in c# with a icon files inside this dll and use like this example? Someone can show a simple example? Best regards.