Jump to content

b47chguru

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by b47chguru

  1. ok modified the example code.
  2. 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 = ""]]]]]])
  3. 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
  4. 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...
  5. 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..
  6. @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.
  7. yes, _arrayDisplay function doesnt display the array element in this case $table[0]
  8. @kylomas sorry, my bad... my first regex itself was working, the problem is that _arraydisplay doesnt display it anyways thanks for helping out!
  9. @kylomas the regex still doesnt work with the file.. but the funny thing is that regex works with the StringRegExpGui udf..
  10. your regex doesnt work.. try it with the file link
  11. Awesome!!
  12. 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
  13. 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.
  14. hi, i want to get the pointer to connected socket and send it to another program so that the other program can communicate with the socket.. can you guys guide me on how to do it with an example script? thanks in advance.
  15. hi.. how to know the exact time of execution, handles and file location of a process that is running..?
  16. How is it possible to change the specific properties of a file.. for eg: to change the Album of an mp3 file.. i know we can get the properties of file with the UDF _FileGEtProperty.. thanks in advance..
  17. @JLogan3o13 Thanks for the reply, I am trying to automate UAC as there is a provision in Taskmanager to run a task with admin privilages after clicking the button "Show processes from all users" in the process tab
  18. Hi all, i am new to Autoit and i am trying to develop a program to interact with Taskmanager in Win7and the Mousemove function doesnt work after Taskmanager is run with admin privilages.. Global $Win_pos, $a, $rock Run("taskmgr.exe", @WindowsDir) sleep(4000) $a = ControlGetFocus("Windows Task Manager") $handle = WinGetHandle("Windows Task Manager", "") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else $rock = ControlClick($handle, "", "[ID:2040]") Sleep(3000) $Win_pos = WinGetPos ( "Windows Task Manager") msgbox(0, "",ControlCommand("Windows Task Manager", "", 1000, "TabRight", "")) $Win_posx = $Win_pos[0] + 17 $Win_posy = $Win_pos[1] + 35 sleep(5000) BlockInput(1) MouseMove($Win_posx,$Win_posy) hope you can help me out.
×
×
  • Create New...