Jump to content

Recommended Posts

Posted (edited)

This is just an example, but i want to know how to use a list on a GUI.. i wrote out this function, but i dont want to test it to see if it works, cuz its kind of a risky move to do that, so here's my function and please let me know if i have this correct or how i can get it correct, Thanks :)

Func InjectThem()
    $one = 1
    Do
        $This = FileReadLine($File, $one)
        ProcessWait("Notepad.exe", 100)
        $hWnd = ProcessExists("Notepad.exe")
        _InjectDll($This, $hWnd)
        $one = $one + 1
    Until @error
    Do
        ProcessWaitClose("Notepad.exe")
        _FreeRemoteDll($This, $hWnd)
        $one = $one - 1
    Until @error
    Exit
EndFunc

im using the list to write to $File so that whats on the list is whats in $File

Edited by demandnothing
Posted

well it wont allow me to do a loop inside of a function like that.. so how would i make my function be a loop? here's an example from a music player i have.

Func play()
    $Line = FileReadLine($playlistpath, $linenumber)
    FileDelete($songlistpath)
    _FileCreate($songlistpath)
    FileWrite($songlistpath, $Line & @CRLF)
    SoundPlay($Line)
    $linenumber = $linenumber + 1
EndFunc

see if i put Do..Until loop it stops the entire music player from working, and the same thing happens when i put While...WEnd loop..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...