
Tsimo
Members-
Posts
10 -
Joined
-
Last visited
Everything posted by Tsimo
-
Thanks a lot
-
thanks a lot. And a last question, when i convert to exe and use and ico do i have to do anything so that i can see the ico on other computer or it's ok automaticaly?
-
i think im satisfied with jayson's program. Thanks a lot, i did a few small changes (fixes) and now i just turn it in to an exe? I Think its fine now. Thanks #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include <GuiMenu.au3> #include <array.au3> Global $Data = "The List.ini", $LireINIi = IniReadSection($Data, "Info") Global $aLV_Click_Info, $hTmp_Edit, $fDblClk = False, $fInfoGUI = False $GUI = GUICreate("My Watchlist", 400, 200) $NVT = _GUICtrlListView_Create($GUI, "", 5, 5, 390, 190,Bitor($LVS_REPORT, $LVS_SORTASCENDING),$WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($NVT, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_BORDERSELECT)) _GUICtrlListView_InsertColumn($NVT, 0, "Title", 180, 2) _GUICtrlListView_InsertColumn($NVT, 1, "Type", 60, 2) _GUICtrlListView_InsertColumn($NVT, 2, "Score", 60, 2) _GUICtrlListView_InsertColumn($NVT, 3, "Progress", 70, 2) If $LireINIi <> 1 Then For $i = 1 To $LireINIi[0][0] $Nom = $LireINIi[$i][0] $DataNom = StringSplit($LireINIi[$i][1], "|") ;_arraydisplay($adressevilletele) $Adresse = $DataNom[1] $Ville = $DataNom[2] $Telephone = $DataNom[3] _GUICtrlListView_AddItem($NVT, $Nom, $i - 1) _GUICtrlListView_AddSubItem($NVT, $i - 1, $Adresse, 1) _GUICtrlListView_AddSubItem($NVT, $i - 1, $Ville, 2) _GUICtrlListView_AddSubItem($NVT, $i - 1, $Telephone, 3) Next EndIf GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 If $hTmp_Edit <> 0 Then ; If a temporary edit exists If _IsPressed("0D") Then ; If ENTER pressed $sText = GUICtrlRead($hTmp_Edit) ; Set label to edit content _GUICtrlListView_SetItemText($NVT, $aLV_Click_Info[0], $sText, $aLV_Click_Info[1]) GUICtrlDelete($hTmp_Edit) ; Delete temporary edit $hTmp_Edit = 0 EndIf EndIf If $fDblClk Then ; If an item was double clicked $fDblClk = False GUICtrlDelete($hTmp_Edit) ; Delete any existing temporary edits $sTmp_Text = _GUICtrlListView_GetItemText($NVT, $aLV_Click_Info[0], $aLV_Click_Info[1]) ; Read current text of clicked label Switch $aLV_Click_Info[1] ; Get label position Case 0 ; On Item $aLV_Rect_Info = _GUICtrlListView_GetItemRect($NVT, $aLV_Click_Info[0], 2) Case Else ; On SubItem $aLV_Rect_Info = _GUICtrlListView_GetSubItemRect($NVT, $aLV_Click_Info[0], $aLV_Click_Info[1]) EndSwitch $hTmp_Edit = GUICtrlCreateEdit($sTmp_Text, $aLV_Rect_Info[0] + 8, $aLV_Rect_Info[1] + 7, $aLV_Rect_Info[2] - $aLV_Rect_Info[0], $aLV_Rect_Info[3] - $aLV_Rect_Info[1], 0) ; Create temporary edit GUICtrlSetState($hTmp_Edit, $GUI_FOCUS) EndIf If $fInfoGUI = True Then $fInfoGUI = False InfoGUI() EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func SauveTout() If FileExists($Data) Then FileDelete($Data) EndIf For $a = 0 To _GUICtrlListView_GetItemCount($NVT) - 1 $Nom1 = _GUICtrlListView_GetItemText($NVT, $a, 0) $Adresse1 = _GUICtrlListView_GetItemText($NVT, $a, 1) $Ville1 = _GUICtrlListView_GetItemText($NVT, $a, 2) $Telephone1 = _GUICtrlListView_GetItemText($NVT, $a, 3) IniWrite($Data, "Info", $Nom1, $Adresse1 & "|" & $Ville1 & "|" & $Telephone1) Next EndFunc ;==>SauveTout Func ListView_RClick() Local $Ajouter = 1, $Supprimer = 2, $Effacer = 3, $Sauvegarder = 4 $Menu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_AddMenuItem($Menu, "Add", $Ajouter) _GUICtrlMenu_AddMenuItem($Menu, "Delelte", $Supprimer) _GUICtrlMenu_AddMenuItem($Menu, "Delete all", $Effacer) _GUICtrlMenu_AddMenuItem($Menu, "") _GUICtrlMenu_AddMenuItem($Menu, "Save", $Sauvegarder) Switch _GUICtrlMenu_TrackPopupMenu($Menu, $NVT, -1, -1, 1, 1, 2) Case $Ajouter $fInfoGUI = True Case $Supprimer ConsoleWrite(_GUICtrlListView_DeleteItemsSelected($NVT)) Case $Effacer _GUICtrlListView_DeleteAllItems($NVT) Case $Sauvegarder SauveTout() EndSwitch _GUICtrlMenu_DestroyMenu($Menu) EndFunc ;==>ListView_RClick Func InfoGUI() $GUI1 = GUICreate("Information", 311, 135) GUICtrlCreateLabel("Title :", 36, 7, 30, 20) $Nom = GUICtrlCreateInput("", 70, 5, 170, 20) GUICtrlCreateLabel("Type :", 32, 32, 38, 20) $Adresse = GUICtrlCreateInput("", 70, 30, 170, 20) GUICtrlCreateLabel("Score :", 28, 57, 40, 20) $Ville = GUICtrlCreateInput("", 70, 55, 170, 20, 0x2000) GUICtrlCreateLabel("Progress :", 15, 82, 51, 20) $Telephone = GUICtrlCreateInput("", 70, 80, 170, 20, 0x2000) $Ajoute = GUICtrlCreateButton("Add", 243, 4, 65, 47, 0x0001) $Annule = GUICtrlCreateButton("Cancel", 243, 54, 65, 47) GUISetState() While 1 Switch GUIGetMsg() Case $Ajoute $Nom1 = GUICtrlRead($Nom) $Adresse1 = GUICtrlRead($Adresse) $Ville1 = GUICtrlRead($Ville) $Telephone1 = GUICtrlRead($Telephone) $iIndex = _GUICtrlListView_GetItemCount($NVT) If $iIndex = -1 Then $iIndex = 0 _GUICtrlListView_AddItem($NVT, $Nom1, $iIndex) _GuiCtrlListView_AddSubItem($NVT, $iIndex, $Adresse1, 1) _GUICtrlListView_AddSubItem($NVT, $iIndex, $Ville1, 2) _GUICtrlListView_AddSubItem($NVT, $iIndex, $Telephone1, 3) GUISetState(@SW_HIDE, $GUI1) GUISwitch($GUI) ExitLoop Case $Annule GuiDelete($GUI1) ;GUISetState(@SW_HIDE, $GUI1) ;GUISwitch($GUI) ExitLoop Case $GUI_EVENT_CLOSE ;GUISetState(@SW_HIDE, $GUI1) GuiDelete($GUI1) ;GUISwitch($GUI) ExitLoop EndSwitch WEnd EndFunc ;==>InfoGUI Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) Local $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $NVT Switch $iCode Case $NM_RCLICK ListView_RClick() Case $NM_DBLCLK $aLV_Click_Info = _GUICtrlListView_SubItemHitTest($NVT) If $aLV_Click_Info[0] <> -1 Then $fDblClk = True EndSwitch EndSwitch Return $GUI_RUNDEFMSGEndFunc ;==>WM_NOTIFY And another question, i made another program and turned to exe and gave it to a friend but he couldn't see the picture that i used in the program... i used the commands: FileInstall("C:UsersTsimoPicturesPhotoshopReadyBored of Tags4567.jpg","C:UsersTsimoDocumentsTsimoAutoit ProgrammsCodingBored of Tags4567.jpg") $bk = GUICtrlCreatePic("C:UsersTsimoPicturesPhotoshopReadyBored of Tags4567.jpg", 0, 0, 700, 500)
-
i dont really know how to use it... i get confused cause i just started using autoit, dont have experience in programming, and english is not my mother's tongue so i dont get some commands.. (many). and btw i cant download it for some reasson
-
There is an error in that... line 85 can you correct it?
-
Thanks a lot, i appreciate your guidance. Do you have any ideas on how to edit, the progress of a show? so i can keep track? can it be done on the listview with some parameter?
-
can't anyone help me plz? i m doing small steps on my own but still need help #include #include #include Watchlist() Func Watchlist() Local $listview, $button1, $button2, $button3, $button4, $title, $type, $score, $progress, $listviewbk Local $string1, $string2, $string3, $string4, $sFilePath, $eof, $olditems, $edititem, $newitem, $msg GUICreate("My Watchlist", 420, 250, 100, 200, -1, $WS_EX_STATICEDGE) GUISetBkColor(0x00E0FFFF) $listview = GUICtrlCreateListView(" Title | Type | Score | Progress ", 10, 10, 400, 150, 0x8014) $button1 = GUICtrlCreateButton("Add", 17, 200, 70, 40) $button2 = GUICtrlCreateButton("Edit", 112, 200, 70, 40) $button3 = GUICtrlCreateButton("Delete", 207, 200, 70, 40) $button4 = GUICtrlCreateButton("Save", 300, 170, 110, 70) $title = GUICtrlCreateInput("", 10, 170, 150, 20) $type = GUICtrlCreateInput("", 170, 170, 50, 20) $score = GUICtrlCreateInput("", 230, 170, 20, 20, 0x2000) $progress = GUICtrlCreateInput("", 260, 170, 25, 20, 0x2000) $listviewbk = GUICtrlSetBkColor ($listview, 0xdddddd) GUISetState() $sFilePath = "C:UsersTsimoDesktopMy watchlist.ini" Local $eof = _FileCountLines($sFilePath) ; $olditems =GUICtrlCreateListViewItem (IniReadSectionNames ($sFilePath), $listview) For $i = 2 to $eof $olditems =GUICtrlCreateListViewItem (FileReadLine($sFilePath, $i), $listview) Next Do $msg = GUIGetMsg() Select Case $msg = $button1 $string1 = GUICtrlRead($title) $string2 = GUICtrlRead($type) $string3 = GUICtrlRead($score) $string4 = GUICtrlRead($progress) $newitem = GUICtrlCreateListViewItem ($string1 &'|'& $string2 &'|'& $string3 &'|'& $string4, $listview) Case $msg = $button2 ; maybe new small pop up window to edit $edititem = GUICtrlSetData ($string1 &'|'& $string2 &'|'& $string3 &'|'& $string4, GUICtrlRead(GUICtrlRead($listview))) GuiCtrlDelete (GuiCtrlRead($listview)) Case $msg = $button3 GuiCtrlDelete (GuiCtrlRead($listview)) Case $msg = $button4 IniWriteSection ($sFilePath, "section1", GuiCtrlRead(GuiCtrlRead($listview))) Case $msg = $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc
-
im quite new.. i know autoit a long time, but i dont use it a lot. i ve only made some autoclicker, some easy bot for games and some small stuff... anyway, so i've done this so far, but i get an error at guictrlsetdata when i use variables and |. If you can help me with that or recommend an other solution. And second i want to be able to save my list and my changes each time i exit the program. and mass spamer i ve used the include its just that copy paste doesnt copy them dont know why #include #include #include Watchlist() Func Watchlist() GUICreate("listview items", 420, 250, 100, 200, -1, $WS_EX_STATICEDGE) GUISetBkColor(0x00E0FFFF) $listview = GUICtrlCreateListView(" Title | Type | Score | Progress ", 10, 10, 400, 150, 0x8014) $button1 = GUICtrlCreateButton("Add", 17, 200, 70, 40) $button2 = GUICtrlCreateButton("Edit", 112, 200, 70, 40) $button3 = GUICtrlCreateButton("Delete", 207, 200, 70, 40) $button4 = GUICtrlCreateButton("OK!", 300, 170, 110, 70) $title = GUICtrlCreateInput("", 10, 170, 150, 20) $type = GUICtrlCreateInput("", 170, 170, 50, 20) $score = GUICtrlCreateInput("", 230, 170, 20, 20, 0x2000) $progress = GUICtrlCreateInput("", 260, 170, 25, 20, 0x2000) $listviewbk = GUICtrlSetBkColor ($listview, 0xdddddd) GUISetState() Do $msg = GUIGetMsg() Select Case $msg = $button1 $string1 = GUICtrlRead($title) $string2 = GUICtrlRead($type) $string3 = GUICtrlRead($score) $string4 = GUICtrlRead($progress) ;$newitem = GUICtrlCreateListViewItem ($string1|$string2|$string3|$string4, $listview) Case $msg = $button2 ;$edititem = GUICtrlSetData ($string1|$string2|$string3|$string4, GUICtrlRead(GUICtrlRead($listview))) GuiCtrlDelete (GuiCtrlRead($listview)) Case $msg = $button3 GuiCtrlDelete (GuiCtrlRead($listview)) Case $msg = $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc
-
Hello, i want to create a Gui where, i want to write names of tv series (e.x. Game of Thrones) and update my progress on each series(episodes watched) and each time i exit the program i want that too be saved(haven't searched that part yet. I am a newbie in autoit, and i m trying to do it by watching other posts, or the help files but im stuck i've wrote some things this far but its nowhere close yet, and i need some help its from an example from help files #include #include Example() Func Example() Local $listview, $button, $item1, $item2, $item3, $msg GUICreate("listview items", 420, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color $listview = GUICtrlCreateListView("Title |Type|Score|Progress ", 10, 10, 400, 150, 0x8214);,$LVS_SORTDESCENDING) $button = GUICtrlCreateButton("Add Series", 200, 200, 70, 20) $item1 = GUICtrlCreateListViewItem("item2it must be big|col22|col23", $listview) $item2 = GUICtrlCreateListViewItem("item1 i am an idiot|col12|col13", $listview) $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview) GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping GUISetState() ;GUICtrlSetData ;GUICtrlDelete Do $msg = GUIGetMsg() Select Case $msg = $button MsgBox(0, "listview item", GUICtrlRead(GUICtrlRead($listview)), 2) Case $msg = $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example