Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/13/2013 in all areas

  1. Something like this ? #include <GuiConstantsEx.au3> #include <File.au3> #include <Array.au3> #include <ListviewConstants.au3> #include <GuiListView.au3> Local $FileList ;declare variables here, not in a loop Local $DataReadFromList $GUI = GUICreate("Automation", 300, 500) ;is good to save the window handle $mylist = GUICtrlCreateList("", 10, 60, 280, 100) $add = GUICtrlCreateButton("Add", 10, 35, 75, 20) GUISetState(@SW_SHOW,$GUI) ;;;; While 1 $msg = GUIGetMsg() Switch $msg Case $add _FileReadToArray("C:\Users\Danny Tan\Desktop\test.txt", $FileList) If @error Then ContinueLoop ;if file not found do something (else the program will generate error) For $i = 1 To $FileList[0] GUICtrlSetData($mylist, $FileList[$i]) Next Case $mylist ;if select a item from list do stuff $DataReadFromList = GUICtrlRead($mylist) MsgBox(0,0,$DataReadFromList) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd
    2 points
  2. Jon

    Forum Upgraded to IPB 3.4

    The forum has been upgraded. You will need to clear your browser cache. I'm still checking/reconfiguring. I'll post when I've finished.
    1 point
  3. Mystery solved. Although I was doing a WinClose for the RSA token, the process was staying active. I added ProcessClose ( "SecurID.exe" ) after the WinClose line and everything is fine now.
    1 point
  4. jchd

    Newbie and SQLIte

    No automatic variable interpolation in AutoIt or rather I don't recommend it. Try this: $name = "Whatever" _SQLite_Exec($hDskDb,"INSERT INTO Packages (Packagename) VALUES (" & _SQLite_FastEscape($name) & ")")
    1 point
  5. Line 31 of your code might be wrong.
    1 point
  6. BrewManNH

    Dynamic Checkboxes

    Try this change in your _PrinterInstall function Func _PrinterInstall() For $i = 1 To $iPrinternumber If GUICtrlRead($box[$i]) = $GUI_CHECKED Then ;<<<<<<<<<<<<<<<<<<<<<<<<<<< MsgBox(0, $printarr[$i], $printarr[$i] & " has been selected."); <<<<<<<<<<<<<<<< Else EndIf Next MsgBox(0, "Test", "Button has been clicked") EndFunc ;==>_PrinterInstall
    1 point
  7. DucViet321, If you create subframes then you need to create them using the handle of the frame in which it will fit - you were using the main GUI and that will not work as it is already subdivided. Checking in the UDF you can only set the separator width to between 3 and 9 pixels - outside that range will default to 5 pixels. I seem to remember that it was difficult to see the separator if you made it any smaller than 3 pixels wide. By all means change the relevant lines in the UDF of you want to experiment, but I will not offer support if you do. ; Set separator size Local $iSeparatorSize = 5 Switch $iSepSize Case 3 To 9 ; Just change these values <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $iSeparatorSize = $iSepSize EndSwitch Where do you want your ListView created? At present it will appear in the right-hand frame of the subframe as that is the last GUI created. In this script I have used the _GUIFrame_Switch function to set the active GUI to the left-hand frame of the main frame - is that what you intended? #include <GUIFrame.au3> #include <GUIListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("test", 500, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) GUISetState() ; Create a 1st level frame $iFrame_A = _GUIFrame_Create($hGUI, 0, 0, 5) _GUIFrame_SetMin($iFrame_A, 50, 100) ; Create a 2nd level frame $iFrame_B = _GUIFrame_Create(_GUIFrame_GetHandle($iFrame_A, 2), 0, 0, 5) ; You need to handle of the frame, not the GUI <<<<<<<<<<<<<<<<<<< _GUIFrame_SetMin($iFrame_B, 100, 100) _GUIFrame_Switch($iFrame_A, 1) ; Switch to the frame in which you want to create the ListView <<<<<<<<<<<<<<<<<<<<<<<< $cListView = GUICtrlCreateListView(" | ", 5, 5, 240, 460) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50) ; Set the width of both columns <<<<<<<<<<<<<<< ; Set resizing flag for all created frames _GUIFrame_ResizeSet(0) ; Register the $WM_SIZE handler to permit resizing _GUIFrame_ResizeReg() GUICtrlCreateListViewItem("item|123", $cListView) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd All clear now? M23
    1 point
  8. Hi All expert, newbie and lost person , Come here! I want to ask something. Which is easy scripting language type in your opinion. #01: - case sensitive for type name - case sensitive for variable name #02: - case sensitive for type name - case insensitive for variable name #03: - no case sensitive (case insensitive) at all for type name and variable name and also function name. Because currently the code I use for type name, variable name and function name using one list table. So I need you opinion to consider change list table to have one for each one. Well for myself I'm more like number #03 than other but that only my opinion and don't know the other people. Aren't obviously if I wrote what i like when this not only for me. Thanks.
    1 point
  9. ahh... I see now what you mean. Will have a look what is happening because I am sure this was working fine.... Guess I do not care too much about that but will have a look at that too now you mentioned it.
    1 point
  10. Since at least two of you fail to read announcements when they appear in every forum let's try putting this here, too: Yes, we are aware there is a very authentic looking AutoIt Facebook page. It's not ours. Jon does not own it. Assume it is malicious and don't trust it. Likewise, we are also aware of the user spamming links to the page via PM. Please stop reporting it. We are taking care of it and don't need more reports.
    1 point
  11. ivan

    ResHacker project

    I'm sure not as grateful as I am for all the support one can get in this forum, and that includes you. As with many of the kids here, I am self-taught.Thnx.
    1 point
×
×
  • Create New...