Jump to content
Sign in to follow this  
Frostitut

Read Lists

Recommended Posts

Frostitut

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Injector by Frostitut", 370, 225, 192, 124)
GUISetBkColor(0x99B4D1)
$List1 = GUICtrlCreateList("", 136, 32, 201, 97, BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL))
$Label1 = GUICtrlCreateLabel("Process :", 40, 136, 83, 23)
GUICtrlSetColor(-1, 0x000000)
$Input1 = GUICtrlCreateInput("", 136, 136, 201, 21)
$Button1 = GUICtrlCreateButton("Browse", 32, 32, 99, 25)
$Button2 = GUICtrlCreateButton("Clear List", 32, 64, 97, 25)
$Label2 = GUICtrlCreateLabel("Status :", 40, 8, 76, 23)
$Label3 = GUICtrlCreateLabel("Informations", 216, 204, 119, 23)
GUICtrlSetFont(-1, 8, 400, 4, "Pirulen Rg")
GUICtrlSetColor(-1, 0x000080)
$Button3 = GUICtrlCreateButton("Choose this Process!", 40, 168, 297, 25)
local $szDrive, $szDir, $szFName, $szExt
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button2
            GUICtrlSetData($List1,"")
        Case $Button1
            $SelectedFile=FileOpenDialog("Choose your .dll File to inject",@DesktopDir,".dll Files (*.dll)")
            GUICtrlSetData($List1,$SelectedFile)
        Case $Button3
            $Process=GuiCtrlRead($Input1)
            Guictrldelete($Label2)
            $Label2=GUICtrlCreateLabel("Status : Waiting for "& $Process &".exe", 40, 8, 1680, 23)
            _GUICtrlListBox_SetSel($List1)

    $aItems = _GUICtrlListBox_GetSelItemsText($List1)
    For $iI = 1 To $aItems[0]
        $sItems &= @LF & $aItems[$iI]
        Next
    MsgBox(4160, "Information", "Items Selected: " & $sItems)
    EndSwitch
WEnd

I Would like to read the Items which are in the List Box.

Then they should be displayed in the Msg Box.

Error : 

 

>Running AU3Check (1.54.22.0)  from:C:\Program Files (x86)\AutoIt3
C:\Users\User\AppData\Local\Temp\test.au3(45,38) : WARNING: $sItems possibly not declared/created yet
        $sItems &= @LF & $aItems[$iI]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\User\AppData\Local\Temp\test.au3 - 0 error(s), 1 warning(s)
->21:37:45 AU3Check ended. Press F4 to jump to next error.rc:1
>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\User\AppData\Local\Temp\test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
C:\Users\User\AppData\Local\Temp\test.au3 (45) : ==> Variable used without being declared.:
$sItems &= @LF & $aItems[$iI]
^ ERROR
->21:37:49 AutoIt3.exe ended.rc:1
>Exit code: 1    Time: 4.665

Share this post


Link to post
Share on other sites
Melba23

Frostitut,

 

Choose your .dll File to inject

You might like to read the Forum rules - particularly the bit about:

 

Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:

[...]

Running or injecting any code (in any form) intended to alter the original functionality of another process.

before you post again. Thread closed. :naughty:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×