-
Posts
19 -
Joined
-
Last visited
About b47chguru
- Birthday 01/31/1990
Profile Information
-
Location
India
-
WWW
http://logontube.com/
-
Interests
Autoit,programming
b47chguru's Achievements

Seeker (1/7)
0
Reputation
-
ok modified the example code.
-
yes _ArrayDisplay function in this version also requires array passed as reference but somehow it works even if it is not supplied in that way... _ArrayDisplay(Const ByRef $avArray [, $sTitle = "Array: ListView Display" [, $iItemLimit = -1 [, $iTranspose = 0 [, $sSeparator = "" [, $sReplace = "|" [, $sHeader = ""]]]]]])
-
Hi guinness, first of all sorry for the late reply.. and thanks for the example, i get the point...but is there any alternative to Dim? yes i have tested and my example works perfectly.. i am using autoit version v3.3.6.1
-
Thankyou brewman for the reply, i am new to autoit.can you show with an example how using dim on a variable declared locally in a function change it if declared globally later...
-
Few days back i made an associative array UDF for a project as autoit does not have associative array/PHP style array support.it does not keep up to the quality of the example scripts posted in this forum. I hope it may be useful to other amateur developers like me. Main UDF file: associative_arrays.au3 CHM help file: associativearray_chm.zip list of main functions: _SetAssociativeArray() _AddAssociativeArray() _AssociativeArray() print_r() array2json() Json2Array() example script: #include <associative_arrays.au3> $datas = '' ; creates a variable ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Associative_array exmples ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;first example: seting an array value $value = _SetAssociativeArray($datas, 'roger->royal->datar', '','changedatata=>>inprogressd', True) ConsoleWrite(@CR&'first example: seting an array value'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf $value = _AddAssociativeArray($datas, 'roger->royal->datar->0', -1, 'changedatata=>>inprogress', True) ;makes a sub array ConsoleWrite(@CR&'creating a non existent array path roger->royal->datar->0'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf ;second example: pushing an element to the end of an array $value = _AddAssociativeArray($datas, 'roger->royal->datar', -1, 'changedatata=>>inpro', True) ConsoleWrite(@CR&'second example: pushing an element to the end of an array'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf ;third example: adding an element to the 2nd index position in the associative array $value = _AddAssociativeArray($datas, 'roger->royal->datar', 2, 'added element to 2nd position', True) ConsoleWrite(@CR&'third example: adding an element to the 2nd index position in the associative array'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf ;fourth example: changing the element in the 2nd index position in the associative array $value = _SetAssociativeArray($datas, 'roger->royal->datar', 2, '2nd element changed') ConsoleWrite(@CR&'fourth example: changing the element in the 2nd index position in the associative array'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf ;fifth example: changing the element in the first index position in the associative array $value = _SetAssociativeArray($datas, 'roger->royal->datar', 1, 'first element changed') ConsoleWrite(@CR&'fifth example: changing the element in the first index position in the associative array'&@CR) If $value > -1 Then print_r($datas) Else ConsoleWrite("Failed: " & $value) EndIf _SetAssociativeArray($datas, 'list', '', 'echo', True);makes another array in the root $value = _AssociativeArray($datas, 'roger->royal->datar') _ArrayDisplay($value, 'sixth example: reading an array at the position roger->royal->datar') ConsoleWrite(@CR & 'seventh example: reading the second element of an array'& @CR &_AssociativeArray($datas, 'roger->royal->datar', 2)) $value = _AssociativeArray($datas, 'roger->royal->data') _ArrayDisplay($value, 'eighth example: trying to read an array which doesnt exist') ;print_r($datas) $test_json = '{"0":"again0","1":"again1","5":{"0":"test1","male":["asf","s:dfs,f"," boo\r\n hoo"],"1":"test2","2":"test\t3","3":"dgdg \\n fdgd"},"6":"test4","7":"test5"}' $json_test_array = '' $value = Json2Array($json_test_array, $test_json) ConsoleWrite(@CR&'Converting a json to an associative array'&@CR) If $value > -1 Then print_r($json_test_array) Else ConsoleWrite("Failed: " & $value) EndIf ConsoleWrite(@crlf&'Converting an associative array to json'&@CR& array2json($json_test_array)&@CRLF) ConsoleWrite(Get_Ass_Array($json_test_array, '0', 0, True)&@CR) Do let me know if there are any bugs.. Thank you..
-
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
@FlutterShy yes , i am trying to extract proxies.. i have made a partial css interpreter to decode it into the ip and it works..the only problem which i had was regarding this regex.. @kylomas yes, thankyou very much for helping in solving this problem. -
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
yes, _arrayDisplay function doesnt display the array element in this case $table[0] -
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
@kylomas sorry, my bad... my first regex itself was working, the problem is that _arraydisplay doesnt display it anyways thanks for helping out! -
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
@kylomas the regex still doesnt work with the file.. but the funny thing is that regex works with the StringRegExpGui udf.. -
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
your regex doesnt work.. try it with the file link -
Awesome!!
-
Regex problem , need immediate help
b47chguru replied to b47chguru's topic in AutoIt General Help and Support
Thanks for your reply,i have already succeeded in deobfuscating it.. i dont understand why you said i should post this question in some hackforum when my question is related to autoit regex.. it would be of much help if anyone could provide me with a solution to this regex problem -
hi.. i am working on a script which extracts a webpage source and gets the table elements.. but my regex isn't working properly.. i want to extract the content between <table and </table> from the source.. code: $file = FileOpen("tyu.txt") $file_content = FileRead($file) FileClose($file) $table = StringRegExp($file_content, "(?s)<table((?s).*?)</table>",3) _ArrayDisplay($table) and this is the text file : http://www.comfaca.com/aiyo.txt but the regex is working perfectly with the StringRegExpGui udf.. Thanks in Advance.