L3G3NdKillEr Posted December 7, 2008 Share Posted December 7, 2008 (edited) Hi, I m Getting Problem To Change images from tab lists.. here is my codes.. expandcollapse popup#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231 Global Const $WM_EXITSIZEMOVE = 0x232 HotKeySet("o", "up") HotKeySet("p", "down") HotKeySet("i", "Left") HotKeySet("u", "Right") HotKeySet("0", "Enter") opt("GUIOnEventMode",1);<--------------------added $testGUI = GUICreate("My GUI Tab", 600, 480, 1, 1) ; will create a dialog box that when displayed is centered GUIRegisterMsg($WM_ENTERSIZEMOVE, "OnEnterMove") GUIRegisterMsg($WM_EXITSIZEMOVE, "OnExitMove") GUISetBkColor(0x000000) Global $pos = WinGetPos($testGUI) GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) WinSetOnTop($testgui, "", 1) GUISetState(1, $testgui) WinMove($testgui, "", 0, 25) GUICtrlSetPos($testgui,0, 1) $tab=GUICtrlCreateTab (2,2, 598,400) $tab0=GUICtrlCreateTabitem ("PlayStation") $PsImages = GUICtrlCreatePic("C:\pics\title.jpg", 151, 25, 450, 375) $PsList = GUICtrlCreateList("", 2, 25, 150, 375) GUICtrlSetData(-1, "Pepsi Man|RoadRash|Tekken3|Driver|Galaga|Hercules|Pandemonium 2|Tarzan|Wrestle Mania|Need 4 Speed") GUICtrlSetFont($PsList, 18, 800, 0, "MS Serif") GUICtrlSetColor($Pslist, 0x800000) GUICtrlSetBkColor($Pslist, 0x000000) GUICtrlSetOnEvent($PsList, "Playstation_Pics") $SegaTab =GUICtrlCreateTabitem ( "Sega") $SegaList = GUICtrlCreateList("", 2, 25, 150, 395) GUICtrlSetData(-1, "Aladin|Brian lara96|Racing|The PrideLands|PacMan|SnowBros|Sonic|TinyToon|Jojo|Adventure") $Segapics = GUICtrlCreatePic("C:\pics\title.jpg", 151, 25, 450, 375) GUICtrlSetFont($SegaList, 18, 800, 0, "MS Serif") GUICtrlSetColor($Segalist, 0x800000) GUICtrlSetBkColor($Segalist, 0x000000) GUICtrlSetOnEvent($SegaList, "SegaPics") $tab2=GUICtrlCreateTabitem ("Arcade") $ArcadeList = GUICtrlCreateList("", 2, 25, 150, 395) $ArcadePics = GUICtrlCreatePic("C:\pics\title.jpg", 151, 25, 450, 375) GUICtrlSetData($ArcadeList, "Limpson|SnowBros2|Puzzle Bubble|SnowBros3|J.jSquawkers|Tengai|MightyPang|Cadilacs Dino|HardHead3|Punisher") GUICtrlSetFont($ArcadeList, 18, 800, 0, "MS Serif") GUICtrlSetColor($ArcadeList, 0x800000) GUICtrlSetBkColor($ArcadeList, 0x000000) GUICtrlSetOnEvent($ArcadeList, "Arcade_Pics") GUICtrlCreateTabItem("");<------------------------------------added, you must close your tab definitions GUISetState () GUISetOnEvent($GUI_EVENT_CLOSE,"leave");<----------------added ; Run the GUI until the dialog is closed While 1 ;$msg = GUIGetMsg();<----removed ;If $msg = $GUI_EVENT_CLOSE Then ExitLoop;<-----------removed sleep(50);<-----added Wend Func Leave() Exit EndFunc func up() send("{up}") EndFunc Func Down() Send("{down}") EndFunc Func Left() Send("{left}") EndFunc Func Right() Send("{Right}") EndFunc Func Enter() EndFunc Func Playstation_Pics() $pics = GUICtrlRead($PsList) Switch $pics Case "Pepsi Man" GUICtrlSetImage($PsImages, 'C:\pics\01.jpg') Case "RoadRash" GUICtrlSetImage($PsImages, 'C:\pics\02.jpg') Case "Tekken3" GUICtrlSetImage($PsImages, 'C:\pics\03.jpg') Case "Driver" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Galaga" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Hercules" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Pandemonium 2" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Tarzan" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Wrestle Mania" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Need 4 Speed" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') EndSwitch EndFunc Func SegaPics() $Segapic = GUICtrlRead($SegaList) Switch $Segapic Case "Aladin" GUICtrlSetImage($SegaList, 'C:\pics\01.jpg') Case "Brian lara96" GUICtrlSetImage($Segapics, 'C:\pics\02.jpg') Case "Racing" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "The PrideLands" GUICtrlSetImage($Segapics, 'C:\Pics\04.jpg') Case "PacMan" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "SnowBros" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Sonic" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "TinyToon" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Jojo" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Adventure" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') EndSwitch EndFunc Func Arcade_Pics() $Arcadepic = GUICtrlRead($ArcadeList) Switch $Arcadepic Case "Limpson" GUICtrlSetImage($Arcadepics, 'C:\pics\01.jpg') Case "SnowBros2" GUICtrlSetImage($Arcadepics, 'C:\pics\02.jpg') Case "Puzzle Bubble" GUICtrlSetImage($Arcadepics, 'C:\pics\03.jpg') Case "SnowBros3" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "J.jSquawkers" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Tengai" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "MightyPang" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Cadilacs Dino" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "HardHead3" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Punisher" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') EndSwitch EndFunc Func OnEnterMove() $pos = WinGetPos($testGUI) EndFunc Func OnExitMove() WinMove($testGUI, "", $pos[0], $pos[1]) EndFunc Why Images Is Not Changing..? Where Im Going Wrong..? =S Edited December 8, 2008 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted December 7, 2008 Share Posted December 7, 2008 Hi, I m Getting Problem To Change images from tab lists....... .....Why Images Is Not Changing..? Where Im Going Wrong..? =S You have a couple of small mistakes. You have tried to use on even mode without having set that mode. You cannot mix on event mode and the message loop mode, and you forgot to close your tab definition. Maybe this will work. expandcollapse popup#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> opt("GUIOnEventMode",1);<--------------------added GUICreate("My GUI Tab", 400, 600) ; will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab=GUICtrlCreateTab (10,10, 390,590) $tab0=GUICtrlCreateTabitem ("PlayStation") $PsImages = GUICtrlCreatePic("", 160, 50, 200, 400) $PsList = GUICtrlCreateList("", 25, 50, 150, 400) GUICtrlSetData(-1, "Pepsi Man|RoadRash|Tekken3|Driver|Galaga|Hercules|Pandemonium 2|Tarzan|Wrestle Mania|Need 4 Speed") GUICtrlSetFont($PsList, 18, 800, 0, "MS Serif") GUICtrlSetColor($Pslist, 0x800000) GUICtrlSetBkColor($Pslist, 0x000000) GUICtrlSetOnEvent($PsList, "Playstation_Pics") $SegaTab =GUICtrlCreateTabitem ( "Sega") $SegaList = GUICtrlCreateList("", 25, 50, 150, 400) GUICtrlSetData(-1, "Aladin|Brian lara96|Racing|The PrideLands|PacMan|SnowBros|Sonic|TinyToon|Jojo|Adventure") $Segapics = GUICtrlCreatePic("", 160, 50, 200, 400) GUICtrlSetFont($SegaList, 18, 800, 0, "MS Serif") GUICtrlSetColor($Segalist, 0x800000) GUICtrlSetBkColor($Segalist, 0x000000) GUICtrlSetOnEvent($SegaList, "SegaPics") $tab2=GUICtrlCreateTabitem ("Arcade") $ArcadeList = GUICtrlCreateList("", 25, 50, 150, 400) $ArcadePics = GUICtrlCreatePic("", 160, 50, 200, 400) GUICtrlSetData($ArcadeList, "Limpson|SnowBros2|Puzzle Bubble|SnowBros3|J.jSquawkers|Tengai|MightyPang|Cadilacs Dino|HardHead3|Punisher") GUICtrlSetFont($ArcadeList, 18, 800, 0, "MS Serif") GUICtrlSetColor($ArcadeList, 0x800000) GUICtrlSetBkColor($ArcadeList, 0x000000) GUICtrlSetOnEvent($ArcadeList, "Arcade_Pics") GUICtrlCreateTabItem("");<------------------------------------added, you must close your tab definitions GUISetState () GUISetOnEvent($GUI_EVENT_CLOSE,"leave");<----------------added ; Run the GUI until the dialog is closed While 1 ;$msg = GUIGetMsg();<----removed ;If $msg = $GUI_EVENT_CLOSE Then ExitLoop;<-----------removed sleep(50);<-----added Wend Func Leave() Exit EndFunc Func Playstation_Pics() $pics = GUICtrlRead($PsList) Switch $pics Case "Pepsi Man" GUICtrlSetImage($PsImages, 'C:\pics\01.jpg') Case "RoadRash" GUICtrlSetImage($PsImages, 'C:\pics\02.jpg') Case "Tekken3" GUICtrlSetImage($PsImages, 'C:\pics\03.jpg') Case "Driver" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Galaga" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Hercules" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Pandemonium 2" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Tarzan" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Wrestle Mania" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Need 4 Speed" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') EndSwitch EndFunc Func SegaPics() $Segapic = GUICtrlRead($SegaList) Switch $Segapic Case "Aladin" GUICtrlSetImage($SegaList, 'C:\pics\01.jpg') Case "Brian lara96" GUICtrlSetImage($Segapics, 'C:\pics\02.jpg') Case "Racing" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "The PrideLands" GUICtrlSetImage($Segapics, 'C:\Pics\04.jpg') Case "PacMan" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "SnowBros" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Sonic" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "TinyToon" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Jojo" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Adventure" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') EndSwitch EndFunc Func Arcade_Pics() $Arcadepic = GUICtrlRead($ArcadeList) Switch $Arcadepic Case "Limpson" GUICtrlSetImage($Arcadepics, 'C:\pics\01.jpg') Case "SnowBros2" GUICtrlSetImage($Arcadepics, 'C:\pics\02.jpg') Case "Puzzle Bubble" GUICtrlSetImage($Arcadepics, 'C:\pics\03.jpg') Case "SnowBros3" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "J.jSquawkers" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Tengai" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "MightyPang" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Cadilacs Dino" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "HardHead3" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') Case "Punisher" GUICtrlSetImage($Arcadepics, 'C:\Pics\04.jpg') EndSwitch EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 8, 2008 Author Share Posted December 8, 2008 Yeah It Works Fine Now.. Thank U Soo Much.. i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 8, 2008 Author Share Posted December 8, 2008 Now How To Change Tabs With Hotkey U, I..? and Hotkeys O and P for Up Down List... First Post codes Updated.. i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted December 8, 2008 Share Posted December 8, 2008 Now How To Change Tabs With Hotkey U, I..? and Hotkeys O and P for Up Down List... First Post codes Updated..If you want to change tabs the you need to include GUITAB.AU3. Then you can do things like this Func Left() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow - 1 if $Tabnew>= 0 Then _GUICtrlTab_SetCurSel($tab,$tabnew) EndIf ;Send("{left}") EndFunc If the up and down are for the selected item then there will be similar ways to the way I showed in GUILIST.AU3 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 9, 2008 Author Share Posted December 9, 2008 Thanx For Help.. I ve Tried Using GuilistBoxcreate.. Bt Failed To Do what I want.. =S I ve Made this Change.. Tab Changes Bt List Is Not Changing.. Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow + 1 if $Tabnew>= 0 Then _GUICtrlTab_SetCurSel($tab,$tabnew) EndIf If _IsPressed("50") Then $listnow = _GUICtrllistbox_GetCurSel($list) $listnew = $tabnow + 1 if $listnew>= 0 Then _GUICtrlTab_SetCurSel($list,$listnew) EndIf EndIf Anyway To Do if tab Changes then list changes too and i item is Active.. i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted December 11, 2008 Share Posted December 11, 2008 Thanx For Help.. I ve Tried Using GuilistBoxcreate.. Bt Failed To Do what I want.. =S I ve Made this Change.. Tab Changes Bt List Is Not Changing.. Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow + 1 if $Tabnew>= 0 Then _GUICtrlTab_SetCurSel($tab,$tabnew) EndIf If _IsPressed("50") Then $listnow = _GUICtrllistbox_GetCurSel($list) $listnew = $tabnow + 1 if $listnew>= 0 Then _GUICtrlTab_SetCurSel($list,$listnew) EndIf EndIf Anyway To Do if tab Changes then list changes too and i item is Active.. Try this expandcollapse popup#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <GuiListBox.au3> #include <guitab.au3> Opt("GUIOnEventMode", 1); GUICreate("My GUI Tab", 400, 600); will create a dialog box that when displayed is centered HotKeySet("o", "up") HotKeySet("p", "down") HotKeySet("i", "Left") HotKeySet("u", "Right") GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) Global $SelectedList $tab = GUICtrlCreateTab(10, 10, 390, 590) $tab0 = GUICtrlCreateTabItem("PlayStation") $PsImages = GUICtrlCreatePic("", 160, 50, 200, 400) $PsList = GUICtrlCreateList("", 25, 50, 150, 400) GUICtrlSetData(-1, "Pepsi Man|RoadRash|Tekken3|Driver|Galaga|Hercules|Pandemonium 2|Tarzan|Wrestle Mania|Need 4 Speed") GUICtrlSetFont($PsList, 18, 800, 0, "MS Serif") GUICtrlSetColor($PsList, 0x800000) GUICtrlSetBkColor($PsList, 0x000000) GUICtrlSetOnEvent($PsList, "Playstation_Pics") $SegaTab = GUICtrlCreateTabItem("Sega") $SegaList = GUICtrlCreateList("", 25, 50, 150, 400) GUICtrlSetData(-1, "Aladin|Brian lara96|Racing|The PrideLands|PacMan|SnowBros|Sonic|TinyToon|Jojo|Adventure") $Segapics = GUICtrlCreatePic("", 160, 50, 200, 400) GUICtrlSetFont($SegaList, 18, 800, 0, "MS Serif") GUICtrlSetColor($SegaList, 0x800000) GUICtrlSetBkColor($SegaList, 0x000000) GUICtrlSetOnEvent($SegaList, "SegaPics") $tab2 = GUICtrlCreateTabItem("Arcade") $ArcadeList = GUICtrlCreateList("", 25, 50, 150, 400) $ArcadePics = GUICtrlCreatePic("", 160, 50, 200, 400) GUICtrlSetData($ArcadeList, "Limpson|SnowBros2|Puzzle Bubble|SnowBros3|J.jSquawkers|Tengai|MightyPang|Cadilacs Dino|HardHead3|Punisher") GUICtrlSetFont($ArcadeList, 18, 800, 0, "MS Serif") GUICtrlSetColor($ArcadeList, 0x800000) GUICtrlSetBkColor($ArcadeList, 0x000000) GUICtrlSetOnEvent($ArcadeList, "Arcade_Pics") GUICtrlCreateTabItem(""); GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "leave") ; Run the GUI until the dialog is closed While 1 ;$msg = GUIGetMsg();<----removed Sleep(50);<-----added WEnd Func Leave() Exit EndFunc ;==>Leave Func Playstation_Pics() $pics = GUICtrlRead($PsList) Switch $pics Case "Pepsi Man" GUICtrlSetImage($PsImages, 'C:\pics\01.jpg') Case "RoadRash" GUICtrlSetImage($PsImages, 'C:\pics\02.jpg') Case "Tekken3" GUICtrlSetImage($PsImages, 'C:\pics\03.jpg') Case "Driver" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Galaga" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Hercules" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Pandemonium 2" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Tarzan" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Wrestle Mania" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') Case "Need 4 Speed" GUICtrlSetImage($PsImages, 'C:\Pics\04.jpg') EndSwitch EndFunc ;==>Playstation_Pics Func SegaPics() $Segapic = GUICtrlRead($SegaList) Switch $Segapic Case "Aladin" GUICtrlSetImage($SegaList, 'C:\pics\01.jpg') Case "Brian lara96" GUICtrlSetImage($Segapics, 'C:\pics\02.jpg') Case "Racing" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "The PrideLands" GUICtrlSetImage($Segapics, 'C:\Pics\04.jpg') Case "PacMan" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "SnowBros" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Sonic" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "TinyToon" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Jojo" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') Case "Adventure" GUICtrlSetImage($Segapics, 'C:\pics\03.jpg') EndSwitch EndFunc ;==>SegaPics Func Arcade_Pics() $Arcadepic = GUICtrlRead($ArcadeList) Switch $Arcadepic Case "Limpson" GUICtrlSetImage($ArcadePics, 'C:\pics\01.jpg') Case "SnowBros2" GUICtrlSetImage($ArcadePics, 'C:\pics\02.jpg') Case "Puzzle Bubble" GUICtrlSetImage($ArcadePics, 'C:\pics\03.jpg') Case "SnowBros3" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "J.jSquawkers" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "Tengai" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "MightyPang" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "Cadilacs Dino" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "HardHead3" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') Case "Punisher" GUICtrlSetImage($ArcadePics, 'C:\Pics\04.jpg') EndSwitch EndFunc ;==>Arcade_Pics Func Left() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow - 1 If $tabnew >= 0 Then _GUICtrlTab_ClickTab($tab, $tabnew) ConsoleWrite("left" & $tabnew & @CRLF) EndIf EndFunc ;==>Left Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow + 1 If $tabnew < _GUICtrlTab_GetItemCount($tab) Then _GUICtrlTab_ClickTab($tab, $tabnew) EndIf EndFunc ;==>Right Func down() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow + 1 If $listnew < _GUICtrlListBox_GetCount($listtypes[$tabnow]) Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>down Func up() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow - 1 If $listnew >= 0 Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>up Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 11, 2008 Author Share Posted December 11, 2008 Thanks For Help.. but _GUICtrlTab_ClickTab This Is Undefined Function.. Now What to do..? =S i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted December 11, 2008 Share Posted December 11, 2008 Thanks For Help.. but _GUICtrlTab_ClickTab This Is Undefined Function.. Now What to do..? =SOops sorry. I forgot to mention that it will only work with the beta version unless you add this expandcollapse popup;add this include at the top of your script #include <winapi.au3> . . .. ;Add this function from the beta GuiTab.au3 at the end ; #FUNCTION# ==================================================================================================== ================ ; Name...........: _GUICtrlTab_ClickTab ; Description ...: Clicks a tab ; Syntax.........: _GUICtrlTab_ClickTab($hWnd, $iIndex[, $sButton = "left"[, $fMove = False[, $iClicks = 1[, $iSpeed = 1]]]]) ; Parameters ....: $hWnd - Handle to control ; $iIndex - Specifies the zero based index of the item ; $fButton - Button to click with ; $fMove - If True, the mouse will be moved. If False, the mouse does not move. ; $iClicks - Number of clicks ; $iSpeed - Mouse movement speed ; Return values .: ; Author ........: Paul Campbell (PaulIA) ; Modified.......: Gary Frost (gafrost) ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; Yes ; ==================================================================================================== =========================== Func _GUICtrlTab_ClickTab($hWnd, $iIndex, $sButton = "left", $fMove = False, $iClicks = 1, $iSpeed = 1) Local $iX, $iY, $tPoint, $tRect, $iMode, $aPos If $Debug_TAB Then _GUICtrlTab_ValidateClassName($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) $tRect = _GUICtrlTab_GetItemRectEx($hWnd, $iIndex) $tPoint = _WinAPI_PointFromRect($tRect, True) $tPoint = _WinAPI_ClientToScreen($hWnd, $tPoint) _WinAPI_GetXYFromPoint($tPoint, $iX, $iY) If Not $fMove Then $iMode = Opt("MouseCoordMode", 1) $aPos = MouseGetPos() _WinAPI_ShowCursor(False) MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) Opt("MouseCoordMode", $iMode) MouseMove($aPos[0], $aPos[1], 0) _WinAPI_ShowCursor(True) Else $iMode = Opt("MouseCoordMode", 1) MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) Opt("MouseCoordMode", $iMode) EndIf EndFunc ;==>_GUICtrlTab_ClickTab Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 12, 2008 Author Share Posted December 12, 2008 (edited) i've Added Above Func To my TabGui.au3 and Also Include WinApi.au3 in it now I m getting Error about: Now _winApi_Pointfromrect() & _WinAPI_GetXYFromPoint() is Undefined Func.. =S Edited December 12, 2008 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted December 12, 2008 Share Posted December 12, 2008 i've Added Above Func To my TabGui.au3 and Also Include WinApi.au3 in it now I m getting Error about:Now _winApi_Pointfromrect() & _WinAPI_GetXYFromPoint() is Undefined Func.. =SI think you must have an older version of AutoIt because those functions are in the latest production version. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 12, 2008 Author Share Posted December 12, 2008 (edited) now i ve installed newer version of it.. n func problem is resolved. . but now when i run script and press Hotkeys O And I then Script Suddenly Closes.. Anything Wrong In it..? =O expandcollapse popupFunc Left() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow - 1 If $tabnew >= 0 Then _GUICtrlTab_ClickTab($tab, $tabnew) ConsoleWrite("left" & $tabnew & @CRLF) EndIf EndFunc ;==>Left Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $tabnew = $tabnow + 1 If $tabnew < _GUICtrlTab_GetItemCount($tab) Then _GUICtrlTab_ClickTab($tab, $tabnew) _guictrllistbox_ClickItem($listtypes, 0) EndIf EndFunc ;==>Right Func down() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow + 1 If $listnew < _GUICtrlListBox_GetCount($listtypes[$tabnow]) Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>down Func up() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow - 1 If $listnew >= 0 Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>up Edited December 12, 2008 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
youknowwho4eva Posted December 12, 2008 Share Posted December 12, 2008 Looks to me like you don't have error checking for if the first tab is selected or if you are at the top of the list. It closes because your trying to access items that don't exist. My guess that is. Giggity Link to comment Share on other sites More sharing options...
martin Posted December 12, 2008 Share Posted December 12, 2008 now i ve installed newer version of it.. n func problem is resolved. . but now when i run script and press Hotkeys O And I then Script Suddenly Closes.. Anything Wrong In it..? =O expandcollapse popupFunc Left() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow - 1 If $tabnew >= 0 Then _GUICtrlTab_ClickTab($tab, $tabnew) ConsoleWrite("left" & $tabnew & @CRLF) EndIf EndFunc ;==>Left Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $tabnew = $tabnow + 1 If $tabnew < _GUICtrlTab_GetItemCount($tab) Then _GUICtrlTab_ClickTab($tab, $tabnew) _guictrllistbox_ClickItem($listtypes, 0) EndIf EndFunc ;==>Right Func down() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow + 1 If $listnew < _GUICtrlListBox_GetCount($listtypes[$tabnow]) Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>down Func up() $tabnow = _GUICtrlTab_GetCurSel($tab) $listnow = _GUICtrlListBox_GetCurSel($listtypes[$tabnow]) $listnew = $listnow - 1 If $listnew >= 0 Then _GUICtrlListBox_SetCurSel($listtypes[$tabnow], $listnew) EndIf EndFunc ;==>up I don't get that problem when I run what I posted. There is no problem about error checking for the first tab etc. You will have to post your code which gives the problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted December 13, 2008 Author Share Posted December 13, 2008 Hey First Of all Thank You Soo Much FOr Your Kind HElp... I ve MAde This N It Works Fine For Me.. Func Left() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow - 1 If $tabnew >= 0 Then _GUICtrlTab_ClickTab($tab, $tabnew) EndIf $iIndex = _GUICtrlListBox_FindInText($ArcadeList, "LimpS") _GUICtrlListBox_ClickItem($ArcadeList, $iIndex) $iIndex1 = _GUICtrlListBox_FindInText($PsList, "Tekke") _GUICtrlListBox_ClickItem($PsList, $iIndex1) $iIndex2 = _GUICtrlListBox_FindInText($SegaList, "Alad") _GUICtrlListBox_ClickItem($SegaList, $iindex2) ConsoleWrite("left" & $tabnew & @CRLF) EndFunc ;==>Left Func Right() $tabnow = _GUICtrlTab_GetCurSel($tab) $tabnew = $tabnow + 1 If $tabnew < _GUICtrlTab_GetItemCount($tab) Then _GUICtrlTab_ClickTab($tab, $tabnew) EndIf $iIndex = _GUICtrlListBox_FindInText($ArcadeList, "LimpS") _GUICtrlListBox_ClickItem($ArcadeList, $iIndex) $iIndex1 = _GUICtrlListBox_FindInText($PsList, "Tekke") _GUICtrlListBox_ClickItem($PsList, $iIndex1) $iIndex2 = _GUICtrlListBox_FindInText($SegaList, "Alad") _GUICtrlListBox_ClickItem($SegaList, $iindex2) EndFunc Again ThanX..Specially Martin.. i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted January 2, 2009 Author Share Posted January 2, 2009 Hi All..!! i have a problem with _GuictrlTab_clicktab Becuase when i press my hotkey to change tab so mouse moves n clicks outside the Gui so My gui gets hide.. Any solution to Change the tab without mouse moving.. Thanks..!! = i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now