HELP ME!!! Need Help With Linking Function To a GUICtrlCreateListViewItem menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Tantrim's Avatar Corporal
    Reputation
    4
    Join Date
    Feb 2008
    Posts
    26
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HELP ME!!! Need Help With Linking Function To a GUICtrlCreateListViewItem

    So i've been beating my head against the wall for some hours now and can't figure this out.

    Im unsure on how to link a single(1) ListViewItem to a single(1) function. Although i have several functions and list items that I would like to link together. I'm attempting to use a button to do the selection but i'm not much of a programmer.

    I would like to link the Anhur() function to the ListItem labeled Anhur. Currently right now, when i run the program, the anhur function is running 100% of the time, but I want it to only work when its ListItem has been selected with the button. I think it could possibly be done with a GUISetOnEvent but am unsure on how to do this.

    btw, ive been using alot of different peoples codes trying to complete this as im not a programmer, so if you see anything that could be deleted without hindering functionality feel free to share.

    Thanks in Advance to anyone who helps me!!!


    Code:
    #include <GuiListBox.au3>
    #include <GuiListView.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    
    Global $listview
    Opt("GUIOnEventMode", 1)
     
     
    _Main()
    
    Func _Main()
        
      $listGUI = GUICreate("easyScript", 220, 200, 100, 100, -1)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close_Main")
      $listview = GUICtrlCreateListView("Gods", 10, 10, 200, 150)
      _GUICtrlListView_SetColumnWidth($listview, 0, 190)
    
      GUICtrlCreateListViewItem("Anhur", $listview)
      GUICtrlCreateListViewItem("Freya", $listview)
        
      $selectGod = GUICtrlCreateButton("Select God", 75, 165, 80, 30)
      GUICtrlSetOnEvent(-1, "SelectItem")
     
      GUISetState()
            
    EndFunc   ;==>_Main
     
     
    Func SelectItem()
      $sItem = GUICtrlRead(GUICtrlRead($listview))
      MsgBox(0, "Selected Item", $sItem)
    EndFunc
    
    
     
    ;---------------------------------------
    ; Anhur
    ;---------------------------------------
    While 1
       HotKeySet("{F1}", "Anhur")
    WEnd
    
       Func Anhur();
          send("{1}")
             mouseclick("")
             Sleep(400)
          send("{2}")
             mouseclick("")
             Sleep(550)
          send("{4}")
             mouseclick("")
       EndFunc
    
    
    Func On_Close_Main()
       Exit
    EndFunc

    HELP ME!!! Need Help With Linking Function To a GUICtrlCreateListViewItem

Similar Threads

  1. Help with API function (FaceDirection)
    By d3deadl0rd in forum PE Support forum
    Replies: 0
    Last Post: 04-02-2015, 09:23 AM
  2. Need help with Gossip Lua with Functions (3 rep to whoever fixes)
    By stoneharry in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 12-14-2008, 03:30 PM
  3. Need Help With A Link
    By XaVe in forum Community Chat
    Replies: 13
    Last Post: 07-06-2007, 09:06 PM
  4. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  5. Need Help with WoW Glider
    By paypal in forum World of Warcraft General
    Replies: 2
    Last Post: 07-07-2006, 02:08 AM
All times are GMT -5. The time now is 06:33 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search