Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/15/2012 in all areas

  1. GUI*() functions work on other GUI*() functions. AutoIt doesn't know about anything outside what it itself created. If you create UDF controls/windows, you'll have to continue and use UDF functions to work with them. But why are you even using _WinAPI_CreateWindowEx() here and throwing away all the niceties AutoIt provide? I mean, it's not like GUICreate() can't use $WS_POPUP.
    1 point
  2. I would think you could do a simple call to WMI? Something like: $WMI = ObjGet("WinMgmts:root/cimv2") $colQuery1 = $WMI.ExecQuery("Select UserName FROM Win32_ComputerSystem") For $item In $colQuery1 $ID = $item.UserName Next $colQuery2 = $WMI.ExecQuery("Select * FROM Win32_NetworkLoginProfile") For $object In $colQuery2 If $object.Name = $ID Then MsgBox(0, "", $object.Fullname) EndIf Next
    1 point
  3. ... Perform functions 1, 2 and 3... if something doesn't check out correctly in function 3, return false. If function 3 returns false, restart the damn loop. How the hell is it "not call all functions sometimes.". If your code is written correctly, it should do exactly what is stated above. If it's not performing correctly, the problem lies in some code in the functions not performing correctly.
    1 point
  4. Your posted code is useless to help us figure out what is going wrong in your script. This posted code obviously has no connection with what you're really doing in the script because there are no conditional checks being done, you're just jumping from one function to another and then recursing to the first one again. If you want real help, post the code that's not working, not something that isn't going to help you, or help us help you. If you're unwilling to post even a reproducer script that shows what you're doing in your real script then you're on your own. As stated, this code will run all three of your functions every time, then jump back to the First() function and do it all over again. So, to answer your original question, there's nothing wrong with your code, must be something else you're not showing us. Once you figure out how to post the code that isn't working, come back for some real help. In the meantime, stop asking pointless questions and posting shit code.
    1 point
  5. BeBoP, You will have to do it in code like this: #include <GUIConstantsEx.au3> #include <GuiComboBox.au3> $hGUI = GUICreate("Test", 500, 500) $hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20) GUICtrlSetData(-1, "1|2|3|------|4|5|6") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hCombo ; Look for the separator If GUICtrlRead($hCombo) = "------" Then ; And remove it _GUICtrlComboBox_SetEditText($hCombo, "") EndIf ; Prove there is nothing to read ConsoleWrite(GUICtrlRead($hCombo) & @CRLF) EndSwitch WEnd All clear? M23
    1 point
  6. 1 point
×
×
  • Create New...