
Aceguy
Active Members-
Posts
629 -
Joined
-
Last visited
Profile Information
-
Member Title
YAY ME.....
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Aceguy's Achievements

Universalist (7/7)
1
Reputation
-
Nyo reacted to a post in a topic: FFXI CRAFTING BOT
-
Converting this script to autoit
Aceguy replied to Aceguy's topic in AutoIt General Help and Support
and besides, this topic has been covered, a long while ago... hence my reposts. -
Converting this script to autoit
Aceguy replied to Aceguy's topic in AutoIt General Help and Support
just to clarify, Yes it is FFXI, no its not for a bot... if u play FFXI u will realize its very difficult to level your char now from lvl 1. i would like to write my own dual boxing programe to /assist me... and again NOT A BOT. then u might say, there are programs out there that do that. yes, but what have i learnt, NOTHING.... i prefer to understand and learn myself.. but need a little help.. and also, ihave been playing FFXI for 6 years... why would i risk everything i have achieved coz of a spam bot, @bogQ people jump to the wrong conclusions very quickly, perhas u shold take a step back first BEFORE u report people and SEE what they intend.!!!! -
namespace SomeNamespace { using FFACETools; public partial class Form1 : Form { /// <summary> /// Our instance of FFACETools /// </summary> FFACE _FFACE { get; set; } public Form1() { InitializeComponent(); Process[] pol = Process.GetProcessesByName("pol"); //make sure pol is running if (1 > pol.Length) { //let the user know what went wrong MessageBox.Show("FFXI not found"); System.Environment.Exit(0); //close the form } //create the instance using the first pol process found _FFACE = new FFACE(pol[0].Id); string myName = _FFACE.Player.Name; string myOutput = "/echo Hello " + myName; _FFACE.Windower.SendString(myOutput); } } } I have tried and tried, but i cant figure it out in autoit. please help...
-
Hi guys, looking to create a filter from the input box, and display results back into listview.. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include<array.au3> #include <GuiTab.au3> #include <GuiListView.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 443, 192, 124) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore") $Input1 = GUICtrlCreateInput("Input1", 24, 32, 497, 21) GUICtrlSetOnEvent(-1, "Input1Change") $List1 = GUICtrlCreateListview("||", 48, 96, 457, 279) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSetOnEvent(-1, "List1Click") for $x =1 to 20 GUICtrlCreateListViewItem(Random(1,3,1)&"|"&Random(1,3,1),$list1) Next GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Form1Close() Exit EndFunc Func Form1Maximize() EndFunc Func Form1Minimize() EndFunc Func Form1Restore() EndFunc Func Input1Change() dim $array[ _GUICtrlListView_GetItemCount($list1)+1] for $d=1 to _GUICtrlListView_GetItemCount($list1) $array[$d]=_GUICtrlListView_GetItemTextString($list1,$d) Next _ArrayDisplay($array) _GUICtrlListView_DeleteAllItems($list1) EndFunc Func List1Click() EndFunc
-
Great, thanks vm. fast response too
-
Hi guy, been having this problem... i want to create tab items on the contents of a folder (tab item names) then read the txt file contents and put it onto a listview.... When i click a update button, would like to destroy the listviews.. and the tabs, and repopulate.... However, upon RE-creating the listview, it doesnt appear, see code... please help.. #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include<guitab.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Form1", 625, 443, 192, 124) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore") $button = GUICtrlCreateButton("go", 5, 5, 75, 20) GUICtrlSetOnEvent(-1, "go") $Tab1 = GUICtrlCreateTab(64, 32, 521, 377) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) Dim $list[11] For $x = 1 To 10 GUICtrlCreateTabItem($x) $list[$x] = GUICtrlCreateListView("list x", 70, 70, 500, 300) For $d = 1 To 10 GUICtrlCreateListViewItem($x * 10 + $d, $list[$x]) Next Next GUICtrlCreateTabItem("") GUICtrlSetOnEvent(-1, "Tab1Change") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func go() For $t = 1 To _GUICtrlTab_GetItemCount($Tab1) GUICtrlDelete($list[$t]) Next _GUICtrlTab_DeleteAllItems($Tab1) Dim $list[6] For $x = 1 To 5 GUICtrlCreateTabItem($x) $list[$x] = GUICtrlCreateListView("list x", 70, 70, 500, 300) For $d = 1 To 10 GUICtrlCreateListViewItem($x * 10 + $d, $list[$x]) Next Next EndFunc ;==>go Func Form1Close() Exit EndFunc ;==>Form1Close Func Form1Maximize() EndFunc ;==>Form1Maximize Func Form1Minimize() EndFunc ;==>Form1Minimize Func Form1Restore() EndFunc ;==>Form1Restore Func Tab1Change() EndFunc ;==>Tab1Change
-
oh if any amins are reading this, anyway to get rid of my mass spammer status, i have had it since i 1st regiseterd...june 2006
-
this is the way i do it. yea its not got the fancy progress bar, but it doesnt flicker and it always stays on top... just remeber to update the progress bar first then the label.... #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 625, 445, 193, 125) $Progress1 = GUICtrlCreateProgress(48, 88, 353, 65,Default) GUICtrlSetColor(-1, 0x00FF00) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", " ", "wstr", " ") GUICtrlSetStyle(-1, 1) $Label1 = GUICtrlCreateLabel("Label is on top", 80, 96, 116, 49) GUICtrlSetBkColor($Label1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) GUICtrlSetData($Progress1,0) for $ct=0 to 100 GUICtrlSetData($Progress1,$ct) GUICtrlSetData($Label1,"Label is on top "& $ct) sleep(50) Next sleep(2000) Exit
-
hi guys, a while i wrote a programe called x-launcher..... and its time for a face lift..... like sliding windows.. so if anyone wants to try and re mod my prog. feel free.... just curious as to what u guys can come up with.... #include<Array.au3> #include<GuiImageList.au3> #include<GuiListView.au3> #include<Misc.au3> #include<String.au3> #include<ButtonConstants.au3> #include<GUIConstantsEx.au3> #include<ListViewConstants.au3> #include<StructureConstants.au3> #include<WindowsConstants.au3> #include<WinAPI.au3> #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=X-Launch.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("GUIOnEventMode", 1) Opt("TrayIconHide", 1) $a = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "X-Launch") ;if it doesn't write it If @error = -1 Then ConsoleWrite("attempting Regwrite " & $a & @LF) If RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "X-L", "REG_SZ", @ScriptDir & "\X-Launch.exe") <> 1 Then If @error = 1 Then MsgBox(0, "Error", "Unable to save to requested key", 2) ElseIf @error = 2 Then MsgBox(0, "Error", "unable to save main key.", 2) ElseIf @error = 3 Then MsgBox("Error", "Unable to remote connect to the registry", 2) ElseIf @error = -1 Then MsgBox("Error", "Unable to save requested value", 2) ElseIf @error = -2 Then MsgBox("Error", "Value type not supported,", 2) EndIf EndIf EndIf If WinExists("X-L") = 1 Then MsgBox(0, "DOH", "Already running", 0) Exit EndIf $inifile = @MyDocumentsDir & "\X Launcher.ini" Global $gui_active, $set, $last Global $WM_DROPFILES = 0x233 Global $gaDropFiles[1], $buttons Global $mini, $win, $sel, $ms_, $xp, $yp, $lost, $pth, $re_, $sct, $network, $strings, $network_f $buttons = 10 ;$WS_BORDER+$WS_POPUP,$WS_EX_TOOLWINDOW+$WS_EX_TOPMOST $XL = GUICreate("X-L", 204, $buttons * 42, 320, 300, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_ACCEPTFILES, $WS_EX_TOPMOST));44 fist size then 204 GUISetBkColor(0xC8C8FF, $XL) Dim $Pic1[$buttons + 1] Dim $but[$buttons + 1] $network_f = False $network = True $y = 0 $gui_active = True $size = 1 $mini = 0 For $ct = 1 To $buttons $Pic1[$ct] = GUICtrlCreateLabel("", 2, 2 + $y, 40, 40) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetResizing(-1, $GUI_DOCKALL) $but[$ct] = GUICtrlCreateButton("", 6, 6 + $y, 32, 32, $BS_ICON) GUICtrlSetOnEvent(-1, "pressed") GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetState(-1, $GUI_NODROPACCEPTED) $b1 = GUICtrlCreateContextMenu($but[$ct]) $b2 = GUICtrlCreateMenuItem("Change", $b1) GUICtrlSetOnEvent(-1, "change_icon") $y += 42 Next ConsoleWrite("hlistview") $hListView = GUICtrlCreateListView("", 46, 2, 155, 418, $LVS_LIST, $WS_EX_CLIENTEDGE) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetState(-1, $GUI_DROPACCEPTED) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_SUBITEMIMAGES, $LVS_EX_FULLROWSELECT)) $hImage = _GUIImageList_Create(32, 32) _GUICtrlListView_SetImageList($hListView, $hImage, 1) _GUICtrlListView_SetView($hListView, 3) $menu1 = GUICtrlCreateContextMenu($hListView) $delete = GUICtrlCreateMenuItem("Remove", $menu1) GUICtrlSetOnEvent(-1, "delete") $rename = GUICtrlCreateMenuItem("Rename", $menu1) GUICtrlSetOnEvent(-1, "Rename") $info = GUICtrlCreateMenuItem("Path", $menu1) GUICtrlSetOnEvent(-1, "Info") For $u = 1 To $buttons $ri = IniRead($inifile, "icons", $u, "") If $ri <> "" Then GUICtrlSetImage($but[$u], $ri, 0, 1) ElseIf $ri = "" And $u = 1 Then GUICtrlSetImage($but[1], @ScriptDir & "\icons\094_imageres.ico", 0, 1);question mark ElseIf $ri = "" And $u = 2 Then GUICtrlSetImage($but[2], @ScriptDir & "\icons\1_gcdef.ico", 0, 1);game ElseIf $ri = "" And $u = 3 Then GUICtrlSetImage($but[3], @ScriptDir & "\icons\1_Au3InfoA.ico", 0, 1);autoit ElseIf $ri = "" And $u = 4 Then GUICtrlSetImage($but[4], @ScriptDir & "\icons\017_imageres.ico", 0, 1);score ElseIf $ri = "" And $u = 5 Then GUICtrlSetImage($but[5], @ScriptDir & "\icons\147_imageres.ico", 0, 1);burn ElseIf $ri = "" And $u = 6 Then GUICtrlSetImage($but[6], @ScriptDir & "\icons\15_connect.ico", 0, 1);web ElseIf $ri = "" And $u = 7 Then GUICtrlSetImage($but[7], @ScriptDir & "\icons\1_mmc.ico", 0, 1);tools ElseIf $ri = "" And $u = 8 Then GUICtrlSetImage($but[8], @ScriptDir & "\icons\1_mmci.ico", 0, 1);sound ElseIf $ri = "" And $u = 9 Then GUICtrlSetImage($but[9], @ScriptDir & "\icons\1_mspaint.ico", 0, 1);paint ElseIf $ri = "" And $u = 10 Then GUICtrlSetImage($but[10], @ScriptDir & "\icons\10_oobefldr.ico", 0, 1);video EndIf Next ConsoleWrite("reg msg ") GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUISetOnEvent($GUI_EVENT_DROPPED, "Dropped", $XL) GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES_FUNC") GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") $win = WinGetPos("X-L") If FileExists($inifile) = 1 Then $rd_set = IniRead($inifile, "config", 1, "not") If $rd_set <> "not" Then $set = $rd_set $last = $rd_set GUICtrlSetBkColor($Pic1[$set], 0xFF0000) Else $set = 1 $last = 1 GUICtrlSetBkColor($Pic1[$set], 0xFF0000) EndIf $rd_ = IniRead($inifile, "config", 0, "") If $rd_ <> "0" Then $ss3 = StringSplit($rd_, "|") WinMove("X-L", "", $ss3[1], $ss3[2]) GUISetState(@SW_SHOW) Else GUISetState(@SW_SHOW) EndIf ConsoleWrite("Before load" & @LF) load() ConsoleWrite("after load" & @LF) Else ConsoleWrite("else" & @LF) GUISetState(@SW_SHOW) $set = 1 $last = 1 GUICtrlSetBkColor($Pic1[$set], 0xFF0000) For $c_ = 1 To 10 IniWrite($inifile, $c_, 0, 0) Next IniWrite($inifile, "config", 0, 0) If IniWrite($inifile, "config", 1, 1) = 1 Then MsgBox(0, "", "You inifile has been created successfully", 0) Else MsgBox(32, "Error", "Failed to create inifile, Please insure you have Admin priviledges", 0) EndIf EndIf ConsoleWrite("got to while") While 1 Sleep(50) If $win[1] < 0 Then WinMove("X-L", "", $win[0], 0, $win[2], $win[3]) ElseIf $win[1] > @DesktopHeight - $win[3] Then WinMove("X-L", "", $win[0], @DesktopHeight - $win[3], $win[2], $win[3]) ElseIf $win[0] < 0 Then WinMove("X-L", "", 0, $win[1], $win[2], $win[3]) ElseIf $win[0] > @DesktopWidth - $win[2] Then WinMove("X-L", "", @DesktopWidth - $win[2], $win[1], $win[2], $win[3]) EndIf If WinActive("X-L") = 0 And $gui_active = False And $mini = 0 Then $win = WinGetPos("X-L") WinMove("X-L", "", $win[0], $win[1], $win[2], $win[3] - ($buttons * 42), 0) $mini = 1 ElseIf WinActive("X-L") = 1 And $gui_active = False And $mini = 1 Then $win = WinGetPos("X-L") WinMove("X-L", "", $win[0], $win[1], $win[2], $win[3] + ($buttons * 42), 0) $mini = 0 EndIf $win = WinGetPos("X-L") $ms = MouseGetPos() ; if $mini=1 and $ms[0]>10 and $ms[0]<@DesktopWidth-40 then WinMove("X-L","",$ms[0]-10,0) ;gui mouse follow If $ms[0] > $win[0] And $ms[0] < $win[0] + $win[2] And $ms[1] > $win[1] And $ms[1] < $win[1] + $win[3] And $gui_active = False And WinActive("X-L") = 0 Then WinActivate("X-L") $mini = 1 EndIf WEnd Func pressed() Local $iD = @GUI_CtrlId ConsoleWrite("ID " & $iD / 4 & @LF) For $x = 1 To $buttons If $iD = $but[$x] Then GUICtrlSetBkColor($Pic1[(Int($iD / 4))], 0xFF0000) $set = Int($iD / 4) EndIf If $last <> $set Then GUICtrlSetBkColor($Pic1[$last], 0xC8C8FF) Next If $gui_active = True Then If $last = $set Then GUICtrlSetBkColor($Pic1[$set], 0xC8C8FF) $gui_active = False size_box() EndIf ElseIf $gui_active = False Then GUICtrlSetBkColor($Pic1[$set], 0xFF0000) $gui_active = True size_box() EndIf If $gui_active = True And $last <> $set Then _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView)) load() EndIf $last = $set IniWrite($inifile, "config", 1, $set) EndFunc ;==>pressed Func quit() $win = WinGetPos("X-L") IniWrite($inifile, "config", 0, $win[0] & "|" & $win[1]) Exit EndFunc ;==>quit Func size_box() $win = WinGetPos("X-L") If $gui_active = True Then WinMove("X-L", "", $win[0], $win[1], $win[2] + 160, $win[3]) Else WinMove("X-L", "", $win[0], $win[1], $win[2] - 160, $win[3]) EndIf EndFunc ;==>size_box Func Dropped() $read = IniReadSection($inifile, $set) For $d = 0 To UBound($gaDropFiles) - 1 ConsoleWrite("Dropped " & $gaDropFiles[$d] & @LF) $sct = "" If StringRight($gaDropFiles[$d], 4) = ".lnk" Then ConsoleWrite("LINK" & @LF) $FGS = FileGetShortcut($gaDropFiles[$d]) ;_ArrayDisplay($FGS) For $c = 0 To 6 ConsoleWrite("FGS[" & $c & "]" & $FGS[$c] & @LF) Next If $FGS[4] <> "" Then $sct = $FGS[4] ElseIf StringLeft($FGS[0], 2) = "\\" Then $file = $FGS[0] EndIf $file = $FGS[0] Else $file = $gaDropFiles[$d] EndIf ConsoleWrite("$sct>" & $sct & " file>" & $file & @LF) If $file <> "" Then If FileExists($file) = 1 Then $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] EndIf If $sct = "" Then If StringRight($file, 4) = ".mp3" Then ConsoleWrite("MP3" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($file, 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else ConsoleWrite("add image sct" & @LF) $tst = _WinAPI_ExtractIconEx($file, 0, 0, 0, 0) ConsoleWrite("tst -->" & $tst & @LF) If $tst <> 0 Then $index = _GUIImageList_AddIcon($hImage, $file, 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\093_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) EndIf EndIf Else If StringRight($file, 4) = ".mp3" Then ConsoleWrite("2nd MP3" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($file, 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\224_shell32.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else ConsoleWrite("add image file" & @LF) $index = _GUIImageList_AddIcon($hImage, $sct, 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) EndIf EndIf If $read[0][0] = 1 And $read[1][1] = "0" Then If $sct = "" Then ConsoleWrite("1nd" & @LF) IniWrite($inifile, $set, $d, $file) Else $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] ConsoleWrite("Kept String format 1st" & $str & @LF) EndIf ConsoleWrite("Saving 1st iniwrite" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $sct & "|" & $str & "|" & $sct) EndIf Else If $sct = "" Then If StringLeft($file, 2) = "\\" Then ConsoleWrite("2nd" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $gaDropFiles[$d]) Else ConsoleWrite("3rd" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $file) EndIf Else $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] ConsoleWrite("Kept String format 2nd" & $str & @LF) EndIf ConsoleWrite("Saving 2nd iniwrite" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $sct & "|" & $str & "|" & $sct) EndIf EndIf If StringRight($gaDropFiles[$d], 4) = ".lnk" Then FileCopy($gaDropFiles[$d], @DesktopDir & "\Shortcuts\", 9) FileDelete($gaDropFiles[$d]) EndIf Else $lost = $d lost() EndIf EndIf Next EndFunc ;==>Dropped Func delete() IniDelete($inifile, $set, $sel) $read = IniReadSection($inifile, $set) If @error = 1 Then IniWrite($inifile, $set, 0, 0) Else IniDelete($inifile, $set) For $x = 1 To $read[0][0] IniWrite($inifile, $set, $x - 1, $read[$x][1]) Next EndIf _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView)) load() EndFunc ;==>delete Func rename() $get = _GUICtrlListView_GetItemText($hListView, $sel) If StringInStr($get, "Error!") = 0 Then $re_ = GUICreate("???", 150, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateInput("", 2, 2, 145, 25) GUICtrlSetBkColor(-1, 0xC8C8FF) GUICtrlSetFont(-1, 14) GUISetState(@SW_SHOW, $re_) Do Sleep(50) If _IsPressed("DC") And _IsPressed("10") Then MsgBox(0, "", "Do NOT use the | Key", 0) WinActivate("???") WinWaitActive("???") Send("{BACKSPACE}") EndIf Until _IsPressed("0D") $rd_ = IniRead($inifile, $set, $sel, "") If StringInStr($rd_, "|") = 0 Then IniWrite($inifile, $set, $sel, $rd_ & "|" & GUICtrlRead($inp)) _GUICtrlListView_SetItemText($hListView, $sel, GUICtrlRead($inp)) Else $ss2 = StringSplit($rd_, "|") If $ss2[0] = 2 Then IniWrite($inifile, $set, $sel, $ss2[1] & "|" & GUICtrlRead($inp)) ElseIf $ss2[0] = 3 Then IniWrite($inifile, $set, $sel, $ss2[1] & "|" & GUICtrlRead($inp) & "|" & $ss2[3]) EndIf _GUICtrlListView_SetItemText($hListView, $sel, GUICtrlRead($inp)) EndIf GUIDelete($re_) Else MsgBox(0, "", "You cannot rename a broken link", 0) EndIf EndFunc ;==>rename Func info() $g_clicked = False $re_ = GUICreate("???", 350, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateLabel("", 2, 2, 300, 25) GUICtrlSetTip(-1, "Click to close") GUICtrlSetOnEvent(-1, "label_click") GUICtrlSetBkColor(-1, 0xC8C8FF) $go_ = GUICtrlCreateButton("GO", 302, 5, 45, 20) GUICtrlSetOnEvent(-1, "go") GUICtrlSetTip(-1, "Take me there") $rd_ = IniRead($inifile, $set, $sel, "") If StringInStr($rd_, "|") = 0 Then GUICtrlSetData($inp, $rd_) $ss3 = StringInStr($rd_, "\", 0, -1) $ss4 = StringTrimRight($rd_, StringLen($rd_) - $ss3) $pth = $ss4 Else $ss2 = StringSplit($rd_, "|") GUICtrlSetData($inp, $ss2[1]) $ss3 = StringInStr($ss2[1], "\", 0, -1) $ss4 = StringTrimRight($ss2[1], StringLen($ss2[1]) - $ss3) $pth = $ss4 EndIf GUISetState(@SW_SHOW, $re_) EndFunc ;==>info Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam) Local $nSize, $pFileName Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255) For $i = 0 To $nAmt[0] - 1 $nSize = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0) $nSize = $nSize[0] + 1 $pFileName = DllStructCreate("char[" & $nSize & "]") DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", DllStructGetPtr($pFileName), "int", $nSize) ReDim $gaDropFiles[$i + 1] $gaDropFiles[$i] = DllStructGetData($pFileName, 1) $pFileName = 0 Next EndFunc ;==>WM_DROPFILES_FUNC Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $iCode, $tInfo, $iItem $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $iCode = DllStructGetData($tNMHDR, "Code") Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) If $iItem = _GUICtrlListView_GetColumnCount($hListView) - 1 Then Return 1 $ir = IniRead($inifile, $set, DllStructGetData($tInfo, "Index"), "") If StringInStr($ir, "|") = 0 Then $ss3 = StringInStr($ir, "\", 0, -1) $ss4 = StringTrimRight($ir, StringLen($ir) - $ss3) $ms_ = MouseGetPos() $re_ = GUICreate("???", 160, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateInput("", 2, 2, 155, 25) GUICtrlSetBkColor(-1, 0xff0000) GUICtrlSetFont(-1, 14) GUISetState(@SW_SHOW, $re_) GUICtrlSetData($inp,"PLEASE WAIT!!!") ShellExecute($ir, "", $ss4) Sleep(2000) GUIDelete($re_) Else $ss2 = StringSplit($ir, "|") $ss3 = StringInStr($ss2[1], "\", 0, -1) $ss4 = StringTrimRight($ss2[1], StringLen($ss2[1]) - $ss3) $ms_ = MouseGetPos() $re_ = GUICreate("???", 160, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateInput("", 2, 2, 155, 25) GUICtrlSetBkColor(-1, 0xff00000) GUICtrlSetFont(-1, 14) GUISetState(@SW_SHOW, $re_) GUICtrlSetData($inp,"PLEASE WAIT!!!") ShellExecute($ss2[1], "", $ss4) Sleep(2000) guidelete($re_) EndIf Case $NM_RCLICK $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) If $iItem = _GUICtrlListView_GetColumnCount($hListView) - 1 Then Return 1 $sel = DllStructGetData($tInfo, "Index") $ms_ = MouseGetPos() EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func lost() ConsoleWrite("LOST" & @LF) $read = IniRead($inifile, $set, $lost, "") ConsoleWrite("read " & $read & @LF) If StringInStr($read, "|") = 0 Then $ss = StringSplit($read, "\") $s_ = $ss[0] $str = StringTrimRight($ss[$s_], 4) If StringLeft($read, 2) = "\\" Then ConsoleWrite("icon via 1st" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\33_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\093_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $str, $index) EndIf Else $ss2 = StringSplit($read, "|") If StringLeft($ss2[1], 2) = "\\" Then ConsoleWrite("icon via 2nd" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\33_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\093_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss2[2], $index) EndIf EndIf EndFunc ;==>lost Func label_click() GUIDelete($re_) EndFunc ;==>label_click Func go() GUIDelete($re_) ConsoleWrite(@LF & $pth & @LF) ShellExecute("Explorer", $pth) EndFunc ;==>go Func load() $read = IniReadSection($inifile, $set) $network = True For $x = 1 To $read[0][0] If $read[$x][1] <> "0" Then If StringLeft($read[$x][1], 2) = "\\" Then $strings = _StringBetween($read[$x][1], "\\", "\") If Not @error Then ConsoleWrite($strings[0] & " " & $network_f & @LF) If $strings[0] <> $network_f Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\12_comres.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Checking Network", $index) ConsoleWrite(" checking network " & $strings[0] & @LF) $ping = Ping($strings[0], 2000) If $ping = 0 Then $network = False Else $network = True EndIf $network_f = $strings[0] ConsoleWrite("Ping complete " & @LF) _GUICtrlListView_DeleteItem(GUICtrlGetHandle($hListView), $x - 1) EndIf EndIf Else $network = True EndIf If StringInStr($read[$x][1], "|") = 0 And $network = True Then If FileExists($read[$x][1]) = 1 Then $ss = StringSplit($read[$x][1], "\") $s_ = $ss[0] $str = StringTrimRight($ss[$s_], 4) ConsoleWrite($x & "X<--- 1st on load()" & @LF) If StringRight($read[$x][1], 4) = ".mp3" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($read[$x][1], 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss[$s_], $index) Else $tst = _WinAPI_ExtractIconEx($read[$x][1], 0, 0, 0, 0) If $tst <> 0 Then $index = _GUIImageList_AddIcon($hImage, $read[$x][1], 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\23_wmploc.ico", 0, True) _GUICtrlListView_AddItem($hListView,$read[$x][1], $index) EndIf EndIf Else $lost = $x - 1 ConsoleWrite("Before lost" & @LF) lost() EndIf ElseIf $network = True Then $ss2 = StringSplit($read[$x][1], "|") $ss2_ = $ss2[0] If FileExists($ss2[1]) = 1 Then ConsoleWrite("2nd on load() " & @LF) If $ss2[0] = 3 Then ConsoleWrite($x & "X<--- 2nd on load() 1st if " & @LF) $index = _GUIImageList_AddIcon($hImage, $ss2[3], 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) Else If StringRight($ss2[1], 4) = ".mp3" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) ElseIf StringLeft($ss2[1], 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss[$s_], $index) Else $tst = _WinAPI_ExtractIconEx($ss2[1], 0, 0, 0, 0) If $tst <> 0 Then $index = _GUIImageList_AddIcon($hImage, $ss2[1], 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\23_wmploc.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss2[$ss2_], $index) EndIf EndIf EndIf Else $lost = $x - 1 lost() EndIf ElseIf $network = False Then $lost = $x - 1 lost() EndIf EndIf Next ;_GUICtrlListView_SortItems(GUICtrlGetHandle($hListView),1) EndFunc ;==>load Func change_icon() Local $iD = @GUI_CtrlId ConsoleWrite("ID " & Int($iD / 4) & @LF) $fo = FileOpenDialog("Chose an Icon", "", "Icons(*.ico)") If Not @error Then GUICtrlSetImage($but[Int($iD / 4)], $fo, 0, 1) FileCopy($fo, @ScriptDir & "\Icons", 0) $z0 = StringSplit($fo, "\") $z1 = $z0[0] IniWrite($inifile, "icons", Int($iD / 4), @ScriptDir & "\icons\" & $z0[$z1]) EndIf EndFunc ;==>change_icon
-
Update a control while GUI is running
Aceguy replied to burners's topic in AutoIt GUI Help and Support
like this... #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=..\Test.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include<array.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Form1", 625, 445, 193, 125) GUISetState(@SW_SHOW) dim $Button[11] dim $label[11] $g=20 for $x=1 to ubound($Button)-1 $Button[$x] = GUICtrlCreateCheckbox("click me", 5, 24+$g, 65, 25) GUICtrlSetOnEvent(-1,"butt") $g+=20 Next $lbl=GUICtrlCreateinput("QTY",100,50,50,20) while 1 sleep(50) WEnd func butt() Local $iD = @GUI_CtrlId $lbl_ct=0 for $b=$button[1] to $button[10] if BitAnd(GUICtrlRead($b),$GUI_CHECKED) Then $lbl_ct+=1 EndIf Next GUICtrlSetData($lbl,$lbl_ct) EndFunc -
$color = PixelGetColor(500, 500) ; fixed pixels for my current computer screen, change these values if necessary MsgBox(0, "", "Color found @ 500,500 "&$color)
-
thanks guys for your input, both have been greatfullly appreciated.... thanks again.... i never have got the hang of regex.
-
must be regex... that is correct
-
the dialog must contain (has or have) and must also contain (dispatched)
-
hi guys... stuck on this regex.... i want to validate this line of text with regex.... Please be advised that the above invoice has been dispatched to the current address so i want to validate it by has|have and the word dispatched and it MUST contain BOTH instances.... has dispatched | have dispatched... i have tried (has|have)dispatchedbut it only validates dispatched, and ignnores has|have.... so basically the dialog must contain (has or have) and must also contain (dispatched)