
Gyzmok
Active Members-
Posts
100 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by Gyzmok
-
RunAs stops working after some days
Gyzmok replied to Gyzmok's topic in AutoIt General Help and Support
Sorry I gave up on this one. Maybe it is a "windows 2003 server" only problem. I took a different (ugly) approach : changed the GED_START.au3 to a simple "fire and forget" run command. If $CmdLine[0] = 0 Then Exit EndIf ;RunAs("x1adm_gtt","onprvp.fgov.be","*********",1,"D:\autoit_ged\ged.exe "& $CmdLine[1]) $val = Run(@ComSpec & " /c " & 'd:\autoit_ged\ged.exe '& $CmdLine[1], "", @SW_HIDE) Exit In this way the client is not affected by the (short) GED.EXE execution time. The ugly part : Since GED.EXE is now executed as the SYSTEM account it does not "see" the virtual drives. I changed GED.EXE and the resulting output files are now copied on the local server drives. Now it gets ugly : An always running autoitscript (GED_COPY) under a USER account with virtual drive access pics up the output files every minute and dumps them to the right remote location. This GED_COPY is a "must run all the time". to achieve this : a scheduled task starts this script every hour (and "on server startup") to be sure it runs. Inside GED_COPY on the first line there is: ; If _Singleton("ged_copy.exe", 1) = 0 Then Exit EndIf ; Too bad the RUNAS fails after some time. I did not want to use RUNASWAIT. It also took too long to really debug a problem that only occurs after several days ! Thanks for the reply's and I am glad not to be the only one having this issue. -
RunAs stops working after some days
Gyzmok replied to Gyzmok's topic in AutoIt General Help and Support
Thanks for your reply. There isn't more code in this script. The script is named "GED_START.EXE" and is called from Oracle Forms with : vrc_cmd := 'd:\autoit_ged\ged_start.exe '||vrc_xml_filename; HOST(vrc_cmd); We know for sure that the script is called with the right parameter. I had to use this "workaround" because the Oracle processes are run as the SYSTEM account. The SYSTEM account cannot "see" the virtual drives that are used by the GED.EXE Therefore I use the "GED_START.EXE" to run the "GED.EXE" with a profile that does "see" the mounted virtual drives. It all works fine for a little more than a week. Then it suddenly stops working without any error message. (the GED.EXE is simply not run anymore) After restarting the machine everything is fine again for the next week ... I checked the "Task Manager" to see the "processes from all users" None of the scripts stay running all the time. There seems to be no memory leak problem either. (I'll check that in a couple of days) I also used the Recovery Tab in the Secondary Logon service Properties and have chosen : "Restart the Service" on failure. I know ... this is one of those hard to finds ... -
Hi all, I have a strange problem with the RunAs command. I use Autoit version 16th April 2010 - v3.3.6.1. on a windows 2003 server machine. This is the code : If $CmdLine[0] = 0 Then Exit EndIf RunAs("x1adm_gtt","onprvp.fgov.be","*********",1,"D:\autoit_ged\ged.exe "& $CmdLine[1]) Exit This code WORKS fine , but only for one - two weeks. After some days the "D:\autoit_ged\ged.exe " program is never started anymore. I have to restart the machine and then it works fine again ... for about 7 - 10 days. I have searched all the "event viewer" logs : nothing. I have tryed to only restart the "Secondary Logon" service : no solution. Anyone has an idea ? Greetings.
-
The grid is a very nice add. Thanks.
-
@jlundqui : tesseract is a free OCR which has to be installed for the tesseract UDF to work. see : http://www.autoitscript.com/forum/index.ph...mp;hl=tesseract @seangriffin : great work ! I am trying to use this for automating an Oracle forms webbased application (running on an Oracle application server) The application runs on the Sun java plugin version 6U13. The Java Ferret works fine. Your _JavaObjPropertyGet UDF also does the job. But there is a problem when I try to push buttons with the _JavaObjSelect UDF. This syntax does not seem to have any effect on the button that I want to be pushed in the application: $java_obj1 = _JavaObjSelect("[TEXT:Verlaten]", "", "push button") This syntax "crashes" the application: $java_obj1 =_JavaObjSelect("", "Verlaten", "push button") I get an FRM-92100 in the form and the connection with the application server is lost. The java error in the Sun java console looks like this : java.lang.SecurityException: this KeyboardFocusManager is not installed in the current thread's context at java.awt.KeyboardFocusManager.getGlobalFocusOwner(Unknown Source) at java.awt.KeyboardFocusManager.processSynchronousLightweightTransfer(Unknown Source) at sun.awt.windows.WComponentPeer.processSynchronousLightweightTransfer(Native Method) at sun.awt.windows.WComponentPeer.requestFocus(Unknown Source) ... Any suggestion is welcome.
-
Well done ! Works very fine. Thanks
-
_GUICtrlListView_DeleteItemsSelected problem ?
Gyzmok replied to Gyzmok's topic in AutoIt GUI Help and Support
Ok, tnx Gary It was indeed a mixing problem in my script. I now use it like this : _GUICtrlListView_DeleteItemsSelected(GUICtrlGetHandle($hListView)) #include <GuiConstantsEx.au3> #Include <GuiListView.au3> #include <WindowsConstants.au3> ; $myGUI = GuiCreate("_GUICtrlListView_DeleteItemsSelected problem ? ",500, 350,(@DesktopWidth-500)/2, (@DesktopHeight-350)/2 _ ,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) ; $hListView = GUICtrlCreateListView("test", 23, 120, 425, 210, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnWidth($hListView,0,300) ; ;$Button_add1 = GuiCtrlCreateButton("Add to list - method 1",23,23,200,25) $Button_add2 = GuiCtrlCreateButton("Add to list - method 2",23,60,200,25) $Button_remove = GuiCtrlCreateButton("Delete seleted items from list",250,40,200,25) ; GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit ;Case $msg = $Button_add1 ; _add_item_method1() Case $msg = $Button_add2 _add_item_method2() Case $msg = $Button_remove _GUICtrlListView_DeleteItemsSelected(GUICtrlGetHandle($hListView)) Case Else EndSelect WEnd ; ;func _add_item_method1() ; local $text = "add item method1" ; GUICtrlCreateListViewItem($text,$hListView) ;EndFunc ; func _add_item_method2() local $text = "add item method2" _GUICtrlListView_AddItem($hListView,$text) EndFunc -
I have a problem with the _GUICtrlListView_DeleteItemsSelected() command. Depending on how the item was added to the list, it will be deleted or not ... If the item was added with the _GUICtrlListView_AddItem() command, the _GUICtrlListView_DeleteItemsSelected() does not seem to work. I am using autoit v3.2.12.0 , but can also reproduce in v3.2.13.3 (beta). I made a simple example script : #include <GuiConstantsEx.au3> #Include <GuiListView.au3> #include <WindowsConstants.au3> ; $myGUI = GuiCreate("_GUICtrlListView_DeleteItemsSelected problem ? ",500, 350,(@DesktopWidth-500)/2, (@DesktopHeight-350)/2 _ ,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) ; $hListView = GUICtrlCreateListView("test", 23, 120, 425, 210, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnWidth($hListView,0,300) ; $Button_add1 = GuiCtrlCreateButton("Add to list - method 1",23,23,200,25) $Button_add2 = GuiCtrlCreateButton("Add to list - method 2",23,60,200,25) $Button_remove = GuiCtrlCreateButton("Delete seleted items from list",250,40,200,25) ; GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_add1 _add_item_method1() Case $msg = $Button_add2 _add_item_method2() Case $msg = $Button_remove _GUICtrlListView_DeleteItemsSelected($hListView) Case Else EndSelect WEnd ; func _add_item_method1() local $text = "add item method1" GUICtrlCreateListViewItem($text,$hListView) EndFunc ; func _add_item_method2() local $text = "add item method2" _GUICtrlListView_AddItem($hListView,$text) EndFunc As you can see : Items added with method2 : _GUICtrlListView_AddItem will not be deleted when selecting them and pushing "Delete seleted items from list" Is this normal/intended behaviour ? Greets, Guy
-
New version released v 2.021 Questmapper Changes : -Changed the exit button from '+' to 'x' -The quest and npc links now use the default browser instead of IE. Quest data corrections : -The Mastermind Questid : 10099 missing T -Overlord(Elite) : 10400 quest location 43,31 -When this Mine's a-Rokin' : 10079 Leadsto The Mastermind -Wanted Uvuros,scourge of shadowmoon : 10648 side = 'A' -Strange Energy : 9968 quest location 44,27 -The Hermit Smith : 10622 snpc 'Ordinn Thunderfist' + enpc location 'David Wayne' -The Hermit Smith : 10663 snpc 'Grokom Deatheye' + enpc locaton 'David Wayne' -Warning the Cenarion Circle : 9724 ezone 'HP' -Warning the Cenarion Circle : 9733 ezone 'HP' -The Spirit polluted : 9810 quest location 33,50 -Jyoba's Report : 9772 enpc 'Zurai' -Stinging the Stingers : 9841 added -Spirits of the Feralfen : 9846 qinfo added -A Spirit ally : 9847 quest location 44,66 -Natural Enemies : 9743 side = 'B' -Finding the Survivors : 9948 snpc/enpc added 'Elder Ungriz' -Skywing(Elite) : 10898 enpc added 'Rilak the Redeemed' -Speak with Rilak the Redeemed : 10908 ezone = 'SC' Let me know if you find quests that need an update.
-
So AUTOIT is always guilty ...? I don't know if they really go THAT FAR. If they DO they can just as well ban anyone that uses excel, access, internet explorer...etc I am already using Questmapper for months now. (it's always on when playing Wow) As I see it : it's just a tool that displays information from a data file onto your screen. That's all it does...
-
I uploaded a new version this morning. New Version : v 2.020 Problem solved for the people using screen resolution 1024 X 768. The whole screen and all buttons are visible now. Other (higher) resolutions will display exactly as before. This should solve your problem too Valuater. (I know this could have been done in a 'better' way)
-
tnx ! I didn't work alone on this. One colleague collected the data from various websites. (took him months) Another one made and skinned the questmapper website. I did the autoit part. We play the game also (not @ work !) You just need good colleaques
-
You will have to level up a bit Questmapper contains the data of about 950 Alliance + Horde Quests in the Outlands. These are all the non-dungeon TBC quests (before the latest patch)
-
Well, I must admit that the resolution wasn't my main concern. I made this tool mainly on a 1280 x 1024 and a 1440 x 900 screen. Some friends pointed me out that I should make it for 1024 x 768. I started that way, but I did the skinning at the very end and it grew a little out of propotions. On my system the 1024 x 768 resolution loses the 4 border skin-lines and still shows (half) of the 'minimize' and 'exit' buttons in the right top corner. But you are right it should be squeezed a bit more for the 1024 x 768. If I find the time ...
-
Tnx Valuater You are right : the links are from the older test site and forum. I' ve corrected this and v 2.019 is uploaded now. Strange that you don't have the little plus image in the top right corner. (look at the screenshot) it's indeed where you exit the prog. low screen resolution ?
-
This one is for the Wow fans. Questmapper is a tool for World Of Warcraft - The Burning Crusade. It shows the location of quests and npc's involved on a map. Questmappers is made completely with autoit. It uses an SQLite database to store the quest-data. Questmapper is fully skinned and uses lots of images. Screenshot : http://www.autoitscript.com/fileman/users/Gyzmok/v2016.jpg New version released v 2.021 New Version : v 2.020 Problem solved for the people using screen resolution 1024 X 768. The whole screen and all buttons are visible now. Other (higher) resolutions will display exactly as before. The Questmapper v 2.020 source : [autoit]; ;********************************************************************************************************************* ;Questmapper by Gyzmok aka Diabl
-
I understand TNX !
-
TNX ! Sorry that I didn't look any further. Didn't think it would be in an include. There are indeed some strange things about the code : ... Func _SQLite_Startup($sDll_Filename = "") ; Loads SQLite Dll Local $hDll, $hFileDllOut = -1 Local $fUseInline = True Local $vInlineVersion = Call('__' & 'SQLite_Inline_Version') If @error Then $fUseInline = False If IsKeyword($sDll_Filename) Or $sDll_Filename = "" Or $sDll_Filename = -1 Then $sDll_Filename = "sqlite3.dll" If __SQLite_VersCmp(@ScriptDir & "\" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Filename = @ScriptDir & "\" & $sDll_Filename $fUseInline = False ElseIf __SQLite_VersCmp(@SystemDir & "\" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Filename = @SystemDir & "\" & $sDll_Filename $fUseInline = False ElseIf __SQLite_VersCmp(@WindowsDir & "\" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Filename = @WindowsDir & "\" & $sDll_Filename $fUseInline = False ElseIf __SQLite_VersCmp(@WorkingDir & "\" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Filename = @WorkingDir & "\" & $sDll_Filename $fUseInline = False EndIf If $fUseInline Then $sDll_Filename = @SystemDir & "\SQLite3.dll" If Not FileExists($sDll_Filename) Then $hFileDllOut = FileOpen($sDll_Filename, 2) EndIf If $hFileDllOut = -1 Then $sDll_Filename = _TempFile(@TempDir, "~", ".dll") $hFileDllOut = FileOpen($sDll_Filename, 2) If $hFileDllOut = -1 Then Return SetError(1,0,"") _ArrayAdd($g_avSafeMode_SQLite[4], $sDll_Filename) EndIf FileWrite($hFileDllOut, Call('__' & 'SQLite_Inline_SQLite3Dll')) FileClose($hFileDllOut) FileSetTime($sDll_Filename, Call('__' & 'SQLite_Inline_Modified'), 0) EndIf EndIf $hDll = DllOpen($sDll_Filename) If $hDll = -1 Then Return SetError(1, 0, "") Else $g_hDll_SQLite = $hDll Return $sDll_Filename EndIf EndFunc ;==>_SQLite_Startup ... Func __SQLite_VersCmp($sFile, $sVersion) Local $avRval = DllCall($sFile, "str:cdecl", "sqlite3_libversion") If @error Then Return $SQLITE_CORRUPT ; Not SQLite3.dll or Not found If $avRval[0] >= $sVersion Then Return $SQLITE_OK ; Version OK Return $SQLITE_MISMATCH ; Version Older EndFunc ;==>__SQLite_VersCmp ... The OLD SQLite3.dll (08/12/2006) returns version "3.3.7" The NEW SQLite3.dll (02/13/2007) returns version "3.3.13" So the OLD version >= NEW version and returns $SQLITE_OK But that's not all: Supose it did return $SQLITE_MISMATCH (value = 20) and $fUseInline remains TRUE even then it would not be overwritten because of the "If Not FileExists($sDll_Filename)" condition ... ? It could be that I am missing something ... Anyway, thanks for your time and for your great help ! I know the cause now and how to solve it...
-
Yes ! this is what I was looking for. The _getinfo() is only called when needed (UP - DOWN - MOUSECLICK in the Listview) only once and not during population of the Listview ! Very nice ! I am 'trying' to understand : ... If DllStructGetData($tagNMHDR, 6) = 3 And DllStructGetData($tagNMHDR, 7) = 0 And DllStructGetData($tagNMHDR, 8) = 8 Then ...I found this Please can you answer some of these questions ? Is DllStructGetData($tagNMHDR, 6) = uChanged ,DllStructGetData($tagNMHDR, 7) = ptAction and DllStructGetData($tagNMHDR, 8) = lParam ? How do you know what the respectively values 3,0 and 8 stands for ? Where can I find more information about the values of the members inside a 'struct' ? You are a great programmer !
-
I am having "second thoughts" about using the $LVN_ITEMCHANGED event notification for this problem. In the above simple example it works fine. But in a larger application it gets messy. The problem is : the $LVN_ITEMCHANGED notification comes ALOT ! When (re)populating the Listview with new values (GUICtrlListViewInsertItem), the $LVN_ITEMCHANGED is called all the time ! You could solve this by setting a switch (condition). But also when pushing UP and DOWN, the $LVN_ITEMCHANGED notification comes 3 times for each keypress ! See also Here and Here I went back to a variant of the "timer" (previous) solution.
-
Hi all, I have a script that uses SQLite. These includes are in the script : .. #include <SQLite.au3> #include <SQLite.dll.au3> .. It was compiled with the Autoit v3.2.1.14 (beta) Recently I recompiled the script to Autoit v3.2.3.14 (beta) and the script didn't work anymore. (the SQLite functions) It took me some time before I found the cause : Aparantly the (compiled) script creates a .dll file : C:\windows\system32\SQLite3.dll (old SQLite3.dll date = 08/12/2006) The problem : when executing the newer compiled version of the script it does not overwrite the older SQLite3.dll To solve the problem, I had to delete/rename the old SQLite3.dll and then run the newly compiled script again. (new SQLite.dll date = 02/13/2007) I have to do this on several machines ... Question : Why does it not auto-overwrite the older SQLite3.dll ? Is this normal behaviour of the embedded/wrapped SQLite functionality in Autoit ?
-
Hi all, I have a script that uses SQLite. These includes are in the script : .. #include <SQLite.au3> #include <SQLite.dll.au3> .. It was compiled with the Autoit v3.2.1.14 (beta) Recently I recompiled the script to Autoit v3.2.3.14 (beta) and the script didn't work anymore. (the SQLite functions) It took me some time before I found the cause : Aparantly the (compiled) script creates a .dll file : C:\windows\system32\SQLite3.dll (old SQLite3.dll date = 08/12/2006) The problem : when executing the newer compiled version of the script it does not overwrite the older SQLite3.dll To solve the problem, I had to delete/rename the old SQLite3.dll and then run the newly compiled script again. (new SQLite.dll date = 02/13/2007) I have to do this on several machines ... Question : Why does it not auto-overwrite the older SQLite3.dll ? Is this normal behaviour of the embedded/wrapped SQLite functionality in Autoit ?
-
Ok, thanks Gary. You are right, I had to use the $WM_NOTIFY for Listview instead of the $WM_COMMAND ... I think the $LVN_ITEMCHANGED notification will do the job. The solution was in another post from you in this topic : Here I changed the simplified example code into this : ;Autoit beta version v3.2.3.12(beta) #include <GUIConstants.au3> #include <GuiListView.au3> ;#include <Misc.au3> ;Global $ListView Global Const $WM_NOTIFY = 0x004E ;Global Const $DebugIt = 1 ;ListView Events Global Const $NM_FIRST = 0 Global Const $NM_LAST = (-99) Global Const $NM_OUTOFMEMORY = ($NM_FIRST - 1) Global Const $NM_CLICK = ($NM_FIRST - 2) Global Const $NM_DBLCLK = ($NM_FIRST - 3) Global Const $LVN_FIRST = -100; Global Const $LVN_ITEMCHANGED = ($LVN_FIRST-1); $GUI = GuiCreate("Listview",270,400,-1,-1) $mylist = GUICtrlCreateListView("Val1|Val2|Val3", 45, 50, 200, 310, _ BitOR($LVS_SHOWSELALWAYS,$LVS_REPORT), _ BitOR($LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES, $LVS_EX_FLATSB )) $label1 = GUICtrlCreateLabel("",70,10,50,20) $label2 = GUICtrlCreateLabel("",110,10,50,20) $label3 = GUICtrlCreateLabel("",150,10,50,20) for $i = 1 to 50 _GUICtrlListViewInsertItem($mylist,$i-1,$i&"|"&$i&"|"&$i) next GUISetState(@SW_SHOW,$gui) ;Register WM_NOTIFY events GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case Else EndSelect ;If _IsPressed("26")and BitAnd(WinGetState("Listview", ""), 8) Then; UP key ; _getinfo() ;EndIf ;If _IsPressed("28")and BitAnd(WinGetState("Listview", ""), 8) Then; DOWN key ; _getinfo() ;EndIf WEnd ; ; WM_NOTIFY event handler Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) ;NMHDR (hwndFrom, idFrom, code) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) Select Case $wParam = $mylist Select ;Case $event = $NM_CLICK ; ListView_Click () ;Case $event = $NM_DBLCLK ; ListView_DoubleClick () Case $event = $LVN_ITEMCHANGED _getinfo() EndSelect EndSelect $tagNMHDR = 0 $event = 0 $lParam = 0 EndFunc ;==>WM_Notify_Events ; Func _getinfo() $data = _GUICtrlListViewGetItemTextArray($mylist,-1) If Not IsArray($data) Then Return _setdata($label1,$data[1]) _setdata($label2,$data[2]) _setdata($label3,$data[3]) EndFunc ;==>_getinfo() ; Func _setdata($label,$field) GUICtrlSetData($label,$field) EndFunc ;==>_setdata($field,$label) This really seems to be the best solution to be sure the UP and DOWN key-presses are all detected inside the Listview. The scroll speed is also great. Thanks !
-
Ok Gary, Indeed the best way is to use events ... I found the Selchange in one of your posts here I tried to use it into my example, but I don't get it to work Has it something to do with the use of a Listview instead of a List ? Is one of the Listview Style options the cause ? Help would be appreciated... ;Autoit beta version v3.2.3.12(beta) #include <GUIConstants.au3> #include <GuiListView.au3> #include <Misc.au3> Global Const $DebugIt = 1 Global Const $WM_COMMAND = 0x0111 $GUI = GuiCreate("Listview",270,400,-1,-1) $mylist = GUICtrlCreateListView("Val1|Val2|Val3", 45, 50, 200, 310, _ BitOR($LVS_SHOWSELALWAYS,$LVS_REPORT), _ BitOR($LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES, $LVS_EX_FLATSB )) $label1 = GUICtrlCreateLabel("",70,10,50,20) $label2 = GUICtrlCreateLabel("",110,10,50,20) $label3 = GUICtrlCreateLabel("",150,10,50,20) for $i = 1 to 50 _GUICtrlListViewInsertItem($mylist,$i-1,$i&"|"&$i&"|"&$i) next GUISetState(@SW_SHOW,$gui) GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case Else EndSelect ;If _IsPressed("26")and BitAnd(WinGetState("Listview", ""), 8) Then; UP key ; _getinfo() ;EndIf ;If _IsPressed("28")and BitAnd(WinGetState("Listview", ""), 8) Then; DOWN key ; _getinfo() ;EndIf WEnd ; Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Local Const $LBN_ERRSPACE = (-2); Local Const $LBN_SELCHANGE = 1; Local Const $LBN_DBLCLK = 2; Local Const $LBN_SELCANCEL = 3; Local Const $LBN_SETFOCUS = 4; Local Const $LBN_KILLFOCUS = 5; Switch $nID Case $mylist Switch $nNotifyCode ;Case $LBN_ERRSPACE ; _DebugPrint ("$LBN_ERRSPACE") Case $LBN_SELCHANGE _getinfo() ;_DebugPrint ("$LBN_SELCHANGE") ;Case $LBN_SELCANCEL ; _DebugPrint ("$LBN_SELCANCEL") ;Case $LBN_SETFOCUS ; _DebugPrint ("$LBN_SETFOCUS") ;Case $LBN_KILLFOCUS ; _DebugPrint ("$LBN_KILLFOCUS") ;Case $LBN_DBLCLK ; List_DoubleClick() EndSwitch EndSwitch ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND ; Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord ; Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord ; Func _getinfo() $data = _GUICtrlListViewGetItemTextArray($mylist,-1) If Not IsArray($data) Then Return _setdata($label1,$data[1]) _setdata($label2,$data[2]) _setdata($label3,$data[3]) EndFunc ;==>_getinfo() ; Func _setdata($label,$field) GUICtrlSetData($label,$field) EndFunc ;==>_setdata($field,$label)
-
In your code, it should look like this : ... GUICtrlCreatePic("00001475-n.jpg", 0, 0, 354, 500) GuiCtrlSetState(-1,$GUI_DISABLE) ; <----------------------------- Just add this ;and move the create button code AFTER the create picture code $B1 = GUICtrlCreateButton("Start", 260, 110, 65, 25); $B2 = GUICtrlCreateButton("Stop", 260, 140, 65, 25); $B3 = GUICtrlCreateButton("Close", 260, 170, 65, 25); ...