Custom Query
Results (79 - 81 of 3834)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#255 | Fixed | Random() bug | Jpm | anonymous |
Description |
Random(0, 1, 1) always returns 0 |
|||
#256 | Fixed | Multiple windows and tab controls | Jon | Jon |
Description |
With multiple windows and tab controls when you select a tab on one window the controls on BOTH windows change. #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Opt("GUIOnEventMode", 1) Global $ex1winh, $ex2winh, $btn, $btn2, $tab, $othertab Example() Win2() Main() Exit Func Main() While 1 Sleep(200) WEnd EndFunc;==>Main Func Example() Local $tab0, $tab0OK, $tab0input Local $tab1, $tab1combo, $tab1OK Local $tab2, $tab2OK, $msg $ex1winh = GUICreate("My GUI Tab",300,200,50,50) GuiSetOnEvent($GUI_EVENT_CLOSE, "evtClose") GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab = GUICtrlCreateTab(10, 10, 200, 100) $tab0 = GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) $tab0OK = GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlSetOnEvent(-1,"fake") $tab0input = GUICtrlCreateInput("default?", 80, 50, 70, 20) $tab1 = GUICtrlCreateTabItem("tab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) $tab1combo = GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon $tab1OK = GUICtrlCreateButton("OK1", 80, 50, 50, 20) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label2", 30, 80, 50, 20) $tab2OK = GUICtrlCreateButton("OK2", 140, 50, 50) GUICtrlCreateTabItem("") ; end tabitem definition GUICtrlCreateLabel("label3", 20, 130, 50, 20) GUISetState() EndFunc ;==>Example Func Win2() Local $tab0, $tab0OK, $tab0input Local $tab1, $tab1combo, $tab1OK Local $tab2, $tab2OK, $msg Local $tab3, $tab3OK ConsoleWrite("call btn" & @LF) $ex2winh = GUICreate("My 2nd GUI Tab",300,200,200,200) GuiSetOnEvent($GUI_EVENT_CLOSE, "evtClose") GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $othertab = GUICtrlCreateTab(10, 10, 200, 100) $tab0 = GUICtrlCreateTabItem("otab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) $tab0OK = GUICtrlCreateButton("OK0", 20, 50, 50, 20) $tab0input = GUICtrlCreateInput("?default", 80, 50, 70, 20) $tab1 = GUICtrlCreateTabItem("otab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) $tab1combo = GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "CyberSlug"); default Jon $tab1OK = GUICtrlCreateButton("OK1", 80, 50, 50, 20) $tab2 = GUICtrlCreateTabItem("otab2") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label2", 30, 80, 50, 20) $tab2OK = GUICtrlCreateButton("OK2", 140, 50, 50) $tab3 = GUICtrlCreateTabItem("otab3") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label3", 30, 80, 50, 20) $tab3OK = GUICtrlCreateButton("OK3", 140, 50, 50) GUICtrlCreateTabItem("") ; end tabitem definition GUICtrlCreateLabel("label3", 20, 130, 50, 20) GUISetState() EndFunc ;==>Example2 func fake() ; insert code here EndFunc ;==>fake Func evtClose() GUIDelete(@GUI_WINHANDLE) Exit EndFunc;==>evtClose |
|||
#258 | Fixed | bugfix: hard crash when using _ClipBoard_GetData, (from the Clipboard UDF) | Gary | autoit@… |
Description |
This one's been around a while, and I think maybe I've fixed it. Or something. I'm sure this will help someone, since I've seen this problem go unanswered in the archived bug report forum! I found this proposed change by looking at examples given for the Clipboard API in other programming languages, and the one *difference* that they all had in common was to lock and copy the memory when reading from the clipboard. Func _ClipBoard_GetData_Carefully($iFormat = 1) Local $hMemory, $tData Local $hMemoryDest, $hLock If Not _ClipBoard_IsFormatAvailable($iFormat) Then Return SetError(-1, 0, 0) If Not _ClipBoard_Open(0) Then Return SetError(-2, 0, 0) $hMemory = _ClipBoard_GetDataEx($iFormat) _ClipBoard_Close() If $hMemory = 0 Then Return SetError(-3, 0, 0) Switch $iFormat Case $CF_TEXT, $CF_OEMTEXT ;THIS WAS BAD: $tData = DllStructCreate("char Text[8192]", $hMemory) $tData = DllStructCreate("char Text[8192]") ; do it this way so it is allocated...? $hMemoryDest = DllStructGetPtr($tData) ; so let's lock that clipboard memory down and make our own for-sure copy. $hLock = _MemGlobalLock($hMemory) If $hLock = 0 Then Return SetError(-4, 0, 0) ; OK, $hLock should now be the pointer into the clipboard memory _MemMoveMemory($hLock, $hMemoryDest, 8192) _MemGlobalUnlock($hMemory) ; OK *now* we should have our own, good copy. Return DllStructGetData($tData, "Text") Case $CF_UNICODETEXT Return _WinAPI_WideCharToMultiByte($tData) Case Else Return $hMemory EndSwitch EndFunc ;==>_ClipBoard_GetData_Carefully |
Note: See TracQuery
for help on using queries.