
freeman7
Members-
Posts
14 -
Joined
-
Last visited
Everything posted by freeman7
-
Thanks! I take a look! Good Night
-
Hi! I'm creating again notepad with Xskin... Embedded notepad is cool thing But, is there any possibilities to embed notepad to specified place in GUI? I mean situation where calendar is placed on upper left corner and notepad is placed next to it... I used GUICtrlCreateEdit to create editor, example attached. XSkinNotepad.au3
-
File Input field similar to a HTML file_upload_field
freeman7 replied to da.eXecutoR's topic in AutoIt GUI Help and Support
How you use that GUICtrlRead to get the $var? This is just a raw example of my one list-code but it is similar... GUICreate("List", 250, 150) $read = GUICtrlCreateButton("read text", 90, 5, 50, 20) $list = GUICtrlCreateList("" , 5, 5, 70, 180);,$LVS_SORTDESCENDING) GUICtrlSetData($list,"part1|part2|part3|part4|part5") $part1 = GUICtrlCreateListViewItem("part1",$list) $part2 = GUICtrlCreateListViewItem("part2",$list) $part3 = GUICtrlCreateListViewItem("part3",$list) $part4 = GUICtrlCreateListViewItem("part4",$list) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $read $readlist = GUICtrlRead($list, 0) IniWrite(@ScriptDir & "\data.ini", "these were read", "data" , $readlist) Exit EndSelect WEnd Could you send your code here for us to check. -
@ TaskMan What did you ment by that yoy? Case $Button_2 $selected = GUICtrlRead($list) If $Selected = "" Then MsgBox(0, "Processes", "Pick a process to kill.") Else $processkill = MsgBox(4, "Processes", "Do yoy really want to kill process " & $selected & "?") if $processkill = 6 Then ; If killing accepted ProcessClose kills process you selected from process list ProcessClose($selected) GUICtrlSetData($List, "") GUICtrlSetData($List, _FormatProcessList()) EndIf EndIf
-
Great game What about a little GUI with easy to hard settings? I just thought this delay thing...
-
Ofcourse... :"> Thanks!
-
Hello! I created a double window gui. There is main window and another window which is a help window. When I close the help window from X on upper right corner, I get this error message for line 28: Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Case $msg = $XIcon[2] Case $msg = ^ ERROR The only difference to my previous program is that there was only one window and it worked... Does it help if I make it a child window? How could I do it with XSkin? Any help? Code: #Region - Program settings #include <GUIConstants.au3> #include <XSkin.au3> #include <XSkinShell.au3> #NoTrayIcon opt("Trayiconhide", 1) Dim $XSkinGuiExit, $XSkinGuiinfo Dim $Myrunner, $loop #EndRegion #region - guicreate $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" $XSkinGui = XSkinGUICreate ( "My GUI", 412,554, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon = XSkinIcon ($XSkinGui, 3) #endregion GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon[1];Close Exit Case $msg = $XIcon[2];Minimize GUISetState(@SW_MINIMIZE, $XSkinGui) Case $msg = $XIcon[3];Help Call("_help") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _help() $Skin_Folder = @ScriptDir & "\Skins\AzuriX" $XSkinGuiinfo = XSkinGUICreate ( "Help" , 430, 240, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon = XSkinIcon ($XSkinGui, 1) GUICtrlCreateLabel("Help comes to this window." , 25, 45, 380, 20) GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon[1] GUIDelete($XSkinGuiinfo) $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" exitLoop EndSelect WEnd EndFunc ;==>help
-
Set the icon's image on the title bar
freeman7 replied to J0ker's topic in AutoIt GUI Help and Support
Try this: Put your code with icons to folder c:code put this line to the code after #include lines: FileInstall("C:\code\icon.ico", "C:\temp\icon.ico") Now, on wanted place in the code put this: GUISetIcon ("c:\temp\icon.ico") Fileinstall() is a way to put all wanted files into compiled script file. It unpacks those "fileinstalled" files to marked place but will not delete them. It has to be done with FileDelete() I have made some discovering on icon stuff and I think this is only way to make it having only script.exe in folder while run it. Autoit can't use icon straight from an exe. (Like windows style c:file.exe,1) Like this: #include <GUIConstants.au3> FileInstall("C:\code\icon1.ico", "C:\temp\icon1.ico") FileInstall("C:\code\icon2.ico", "C:\temp\icon2.ico") FileInstall("C:\code\icon3.ico", "C:\temp\icon3.ico") FileInstall("C:\code\icon4.ico", "C:\temp\icon4.ico") GUICreate ("My test GUI") GUISetIcon ("c:\temp\icon1.ico") GUISetState ( ) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Does this help you? -
Here is one example I found in these forums. I had to modify it a little bit, but It is okay now. Thanks for creator of a original code! It was #comments-start Program lists all running processes. User can kill prosesses and program makes sure it's ok. I found orginal code from AutoIT's Forums and changed it a little bit. #comments-end #include <GUIConstants.au3> ; systray menu Opt("TrayMenuMode",1) Opt("TrayAutoPause",0) $exititem = TrayCreateItem("Exit") TraySetState() ;GUI $hGui = GUICreate("Process listing" , 331, 290) GUISetState () GUICtrlCreateGroup("Processes" , 123, 1, 205, 284) $list=GUICtrlCreateList ("" , 126, 15, 198, 266) GUICtrlSetLimit(-1,200); to limit horizontal scrolling GUICtrlSetData(-1, _FormatProcessList()) $Button_1 = GUICtrlCreateButton ("Refresh list" , 5, 5, 70, 20) GUICtrlSetState(-1, $GUI_FOCUS) $Button_2 = GUICtrlCreateButton ("Kill chosen process" , 5, 40, 115, 20) $Button_3 = GUICtrlCreateButton ("Open new process" , 5, 75, 115, 20) $Exit = GUICtrlCreateButton ("Exit" , 5, 264, 60, 20) While 1 $msg = GUIGetMsg() Switch $Msg Case $Button_1 GUICtrlSetData($List, "") GUICtrlSetData($List, _FormatProcessList()) Case $Button_2 $selected = GUICtrlRead($list) If $Selected = "" Then MsgBox(0, "Processes", "Pick a process to kill.") Else $processkill = MsgBox(4, "Processes", "Do yoy really want to kill process " & $selected & "?") if $processkill = 6 Then ProcessClose($selected) GUICtrlSetData($List, "") GUICtrlSetData($List, _FormatProcessList()) EndIf EndIf Case $Button_3 $fileopen = FileOpenDialog("Open program", @MyDocumentsDir, "Programs (*.exe;*.com)", 3) If Not @error Then run($fileopen) Case $Exit ExitLoop EndSwitch $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $exititem ExitLoop EndSelect Wend ; Funktioita Func Refresh() GUICtrlSetData($List, "") GUICtrlSetData($List, _FormatProcessList()) EndFunc Func _FormatProcessList() Local $list = ProcessList() Local $retstr = 0 For $i = 1 To $list[0][0] $retstr = $retstr & $list[$i][0] If $i < $list[0][0] Then $retstr = $retstr & "|" Next Return $retstr EndFunc Does this help?
-
I'm ok with that. This code comes inside some tray program I'm creating...
-
Thanks
-
Newest version attached.... Skins.zip
-
Thanks! (Feeling shame for not seeing that before... ) I fixed the code a little bit more... Notepad.au3
-
Hello! I have problems with creating code for file saving. File is created, but notepad's text is not written in. Saved file.txt includes only numbers 64. Should I use some array or something? Notepad.au3