Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/20/2012 in all areas

  1. bogQ

    Help with DLLCall

    i did suggest you to take a look in help file for _WinAPI_SetWindowsHookEx command strangely but in help file under the explanation about that specific func you do have example that not only include usage of _WinAPI_SetWindowsHookEx but _WinAPI_UnhookWindowsHookEx now if you still wanna go with dll call on your own but i hardly see the point i would suggest you to open WinAPI.au3 file located in include folder of your autoit instalation, with your scite editor and look at func _WinAPI_SetWindowsHookEx to see how exactly do it trigger user32 dll. as for your Library86.dll and your not working AHK script, we heare dont know AHK, we know AutoIt, so did you provide anything for us to try to compare not working autoit code with working correct syntax? how can anyone know if something is working if noone have anything that points him to what shud and how shud he do it. Did you explain what your script should represent, what shud it be doing, whats it your end result that you expect from it? Where is that dll located? can i finde it in my windows dir? is there a link to the api documentation? are funcs on that dll exported at all? My point is not to flame you, my point is to open your eyes that you got heare to learn (i hope) AutoIt, not to learn us AHK. Sometimes incomplete questions cannot be answered regardles of how hard you try. so im gona redirect you to small tutorial in hope itl do you some good of understanding dll and au3. Considering that you had take a look at that funcs from help file and opened WinAPI.au3 to see how someone else is dooing it i hope that your next question will be more helpful for us in order to help you.
    1 point
  2. may want to also add a boundry: #include <Array.au3> $str = "NetworkVersion=2.0.4.2" & @CRLF & _ "PatchVersion=2.1.1.8" & @CRLF & _ "LastPatchVersion=2.1.1.7" & @CRLF & _ "ProductName=left4dead2" & @CRLF & _ "appID=550" local $srch = stringregexp($str,'(?i)bPatchVersion=(.*)',3) _ArrayDisplay($srch) ; returns one result local $srch = stringregexp($str,'(?i)PatchVersion=(.*)',3) _ArrayDisplay($srch) ; returns two results
    1 point
  3. It returns an array, you'd need to write it like this. If $srch[0] = "2.1.1.7" Then MsgBox("", "Error", "Your version is not up-to-date.") EndIf
    1 point
  4. This is why you should have posted what you're actually looking at instead of being so obtuse in the first posts. This is only slightly like what you were asking for in the first place. The word version appears in that file several times. If we had known that before we could have come up with a much better answer for you earlier. local $str = fileread(@scriptdir & 'test.ini'); change this to your file name ; search for your string local $srch = stringregexp($str,'(?i)PatchVersion=(.*)',3) if @error = 1 then ConsoleWrite('String not found' & @LF) Exit endif _ArrayDisplay($srch)
    1 point
  5. Maybe you should post a sanitized version of the complete file, this way we know what we're dealing with, and not having you move the goal posts whenever something is posted.
    1 point
  6. LuisMartins, Here is a technique that you can build on (this is one of many ways to do this): #include <array.au3> ; create a test file to simulate your .INF file local $str = '// Some text' & @crlf & '// Another text' & @crlf & 'Version=1.0' & @crlf & 'more data of any kind' local $hfl = fileopen(@scriptdir & 'tmp010.inf',2) filewrite($hfl,$str) fileclose($hfl) $hfl = 0 ; read inf file to string local $str = fileread(@scriptdir & 'tmp010.inf') ; search for your string local $srch = stringregexp($str,'(?i)version.*',3) if @error = 1 then ConsoleWrite('String not found' & @LF) Exit endif ; display results _arraydisplay($srch) kylomas
    1 point
  7. Hi. Welcome to the forum. First off, this isn't a 'script request' place, and next to no-one will write a script for you. But I'd like to help, so here you go.. 1. Read the docs, here. 2. Read 'em again, paying closer attention to this section - Language Reference 3. Read 'em again, paying closer attention to this section - Function Reference 4. Think of what you want your script/program to do. Repeat steps 1, 2, & 3 to see how it can be done in AutoIt. 5. Ask questions about your code here. Well, there ya go! Hope it helps!
    1 point
  8. Unfortunately your INF file isn't in the correct format to be used with the INI* functions. In fact, it doesn't appear to be in the correct format for an INF file either, seeing as how the INF and INI formats are the same. You're going to have to do some parsing of the file, perhaps with FileRead and StringRegExp to determine if the version line is in there or not.
    1 point
  9. In reading your request your description could be for many different types of things. It would be helpful if you told us the name of the app you want to automate. In some cases there will be a UDF available that may be better than pressing keys. Seeing how you are new, you may want to review the forum rules first. We are glad to help, but depending on just you want to do, it may be against the rules.
    1 point
  10. BrewManNH

    Posting Question

    You'd have to delete some of your uploads before you can upload anything else. That's why I use dropbox and link to the files in my Public folder on it instead of uploading the files here. I actually use bitly to link to the dropbox files, that way I can see how often it's downloaded.
    1 point
×
×
  • Create New...