Sign in to follow this  
Followers 0
demandnothing

List Command Help

3 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



You should replace some of the code with msgbox's showing the values of your vars. With this method you can safely test it and see if the data is correct before putting the code back.

-Mike


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0