Jump to content

gseller

Active Members
  • Posts

    1,031
  • Joined

  • Last visited

Everything posted by gseller

  1. Too cool!! Would be a nice addition to Beamer!
  2. This is very well done! My church uses a program called songshow plus, the version we have does not do video, I would love to see this program handle videeo and have a fade in/out. Very well done cramaboule!
  3. Telnet does exist in win 7, you just have to enable it. Comes defaulted as disabled. http://windows.microsoft.com/en-US/windows-vista/Telnet-frequently-asked-questions
  4. Great Job! Looking forward to seeing the rest with a GUI.
  5. Are you going to add the code or a link or something?
  6. That is Awesome! Just write in with the mouse and click off or on the outer gui and it reads it... Way Cool!!
  7. jennico! I am Blessed!! How are you my old friend? Very Nice Script You Have Here! But then all of your scripts are always amazing!
  8. You can make your own, create a new txt file named Update.txt and put Version=1.7 or whatever version you are changing to..
  9. Works Great!! Thank You for sharing!!
  10. Very Nice!! That may come in handy, adding to my tidbits.. Thank you!
  11. Nicd effect JRowe!! Thanks for sharing!
  12. Looks interesting, would love to see a working example?
  13. Ooooh, I likie!! I hadn't thought of doing this, I had made one that would just collect data and copy to clipboard to paste into trouble tickets at work, this is nice tho.. Thank You for sharing it.
  14. Good stuff Malkey!! Thank you!
  15. Thank you, I hope it helps...
  16. Hi Folks! I have been working today on an IP Manager. Thought I would share my example so far. I do realize there are shorter ways of doing alot of what I have done and welcome any feedback showing any better ways. This is a setup for Windows XP Only and has not been fully tested but should work. static.au3 #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.1.1 (beta) Author: gseller Script Function: You can set your default gateway and dns servers for your floor or ip ranges. Users can simply change their static ip or reset back to dhcp. I am going forward to have autoit pull the current ip information and wish to create a means of pulling current settings and adding to ini to store in case a mistake is made you can reset back to default. This will come later.. #ce ---------------------------------------------------------------------------- #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> ;Set initial settings here, these will be written to the initial ini file for later use $netname = "Local Area Connection" $newIp = "Put Your New Static IP Here" $newSubnet = "255.255.252.0" $newDG = "165.122.31.254" $newDNSP = "166.33.193.132" $newDNSS = "166.35.82.120" ;#################################################################################### ;#cs~~~~~~~~~~~~~~~~~~Start INI Creation Section~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Not FileExists(@ScriptDir & "\ip_Settings.ini") Then _FileCreate(@ScriptDir & "\ip_Settings.ini") IniWriteSection(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "") IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "netname", $netname) IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newIp", $newIp) IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newSubnet", $newSubnet) IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDG", $newDG) IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDNSP", $newDNSP) IniWrite(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDNSS", $newDNSS) SplashTextOn( "FYI", "IP Settings file Generated", 300, 65, -1, -1,17 ) Sleep(2000) SplashOff() Else SplashTextOn( "", "Network IP Management Tool" & @CRLF & "Pay Attention Before Submiting" & @CRLF & "IP Setting", 300, 85, -1, -1,17 ) Sleep(2000) SplashOff() EndIf ;#ce~~~~~~~~~~~~~~~~~~~~~~End Of INI Creation Section~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;#################################################################################### ;#cs~~~~~~~~~~~~~~~~~~Start INI Reading Section~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $varNetName = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "netname", "NotFound") $varNewIP = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newIp", "NotFound") $varNewSubnet = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newSubnet", "NotFound") $varNewDG = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDG", "NotFound") $varNewDNSP = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDNSP", "NotFound") $varNewDNSS = IniRead(@ScriptDir & "\ip_Settings.ini", "IP_Settings", "newDNSS", "NotFound") ;MsgBox(4096, "Result", $varNetName & @CRLF & $varNewIP & @CRLF & $varNewSubnet & @CRLF & $varNewDG & @CRLF & $varNewDNSP & @CRLF & $varNewDNSS); This will show what is being pulled from the ini ;#ce~~~~~~~~~~~~~~~~~~~~~~End INI Reading Section~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #Region ### START Koda GUI section ### Form=C:\Users\Jim\Desktop\My Dropbox\Autoit\Autoit Tools\koda_2008-10-03\Forms\Static IP.kxf $Form1 = GUICreate("Network IP Manager - By Jim Dillon", 351, 384, 492, 355) $Group1 = GUICtrlCreateGroup("IP Config", 8, 8, 225, 217) $IPtoChange = GUICtrlCreateInput($varNewIP, 16, 48, 201, 25) $SubmasktoChange = GUICtrlCreateInput($varNewSubnet, 16, 104, 201, 25) $DefaultGatewaytoChange = GUICtrlCreateInput($varNewDG, 16, 160, 201, 25) $Label1 = GUICtrlCreateLabel("Static IP Address To Add:", 16, 28, 129, 17) $Label2 = GUICtrlCreateLabel("Submask:", 16, 84, 51, 17) $Label3 = GUICtrlCreateLabel("Default Gateway:", 16, 142, 86, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("DNS", 8, 240, 225, 129) $PrimaryDNStoChange = GUICtrlCreateInput($varNewDNSP, 16, 272, 209, 25) $SecondaryDNStoChange = GUICtrlCreateInput($varNewDNSS, 16, 328, 209, 25) $Label4 = GUICtrlCreateLabel("Primary DNS:", 16, 256, 67, 15) $Label5 = GUICtrlCreateLabel("Secondary DNS:", 16, 310, 84, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $SetStaticIP = GUICtrlCreateButton("Set Static IP", 240, 16, 73, 97, 0) $SetDHCP = GUICtrlCreateButton("DHCP", 240, 128, 75, 97, 0) $Close = GUICtrlCreateButton("Exit", 240, 246, 75, 121, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~Set Network To Static IP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Case $SetStaticIP If Not $IPtoChange = 0 Then $d = GUICtrlRead($IPtoChange) GUICtrlSetData($IPtoChange, ($d)) $e = GUICtrlRead($SubmasktoChange) GUICtrlSetData($SubmasktoChange, ($e)) $f = GUICtrlRead($DefaultGatewaytoChange) GUICtrlSetData($DefaultGatewaytoChange, ($f)) $g = GUICtrlRead($PrimaryDNStoChange) GUICtrlSetData($PrimaryDNStoChange, ($g)) $h = GUICtrlRead($SecondaryDNStoChange) GUICtrlSetData($SecondaryDNStoChange, ($h)) runwait ('netsh interface ip set address name=' & '"' & $netname & '" static ' & $d & ' '& $e & ' ' & $f & ' 1',"",@SW_Hide) runwait ('netsh interface ip set dns name=' & '"' & $netname & '" static ' & $g & ' primary',"",@SW_Hide) runwait ('netsh interface ip add dns name=' & '"' & $netname & '" addr=' & $g & ' index=2') MsgBox(64,"Static IP Setup as follows:", "Your Static IP has been set and Configured to:" [email="&@CRLF"]&@CRLF[/email] & @CRLF & "Static IP: " & $d & @CRLF & "Submask: " & $e & @CRLF & "Defauly Gateway: " & $f & @CRLF [email="&@CRLF"]&@CRLF[/email] & "Primary DNS: " & $g & @CRLF & "Secondary DNS: " & $h & @CRLF [email="&@CRLF"]&@CRLF[/email] & "Thanks! " & @CRLF & "Jim",3) Else MsgBox(64,"DHCP Set!",$e & "Please enter your IP you need changed?" & @CRLF & "Thanks! " & @CRLF & "Jim",3) EndIf ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~Set Network To DHCP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Case $SetDHCP If WinActivate("dalmn240amcilinkcom - Citrix Presentation Server Client", "") Then MouseMove(165, 140, 0) MouseClick("right") ;~~~~~~~~~~~~~~~~~~~~ Else $netname = "Local Area Connection" runwait ('netsh interface ip set address name=' & '"' & $netname & '" dhcp', "", @SW_HIDE) Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(64,"DHCP Set!","Your PC has been set back to DHCP.. " & @CRLF & "Thanks! " & @CRLF & "Jim",3) Select Case $iMsgBoxAnswer = -1 ;Timeout Case Else ;OK EndSelect EndIf ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Case $Close Exit EndSwitch WEnd
  17. It was no trouble at all... God Bless..
  18. I took a moment to update your code. Here is the updates to 3.3.0.0 #include <GUIConstants.au3> #include <File.au3> #include <Array.au3> #include <GuiListView.au3> #include <ButtonConstants.au3> ;Global Const $LVS_EX_GRIDLINES = 0x00000001 ;Global Const $LVS_EX_FULLROWSELECT = 0x00000020 ;Global Const $LVS_REPORT = 0x0001 ;Global Const $BS_FLAT = 0x8000 $parent = GUICreate(" Databuzz . . .",@DesktopWidth,@DesktopHeight-50, 0,0,-1) GuiSetIcon(@ScriptDir & "\databuzz.ico", 0) GUISetBkColor (0x7090A0) ;Themes $buttonColor = 0x7090A0 $buttonText = 0xFFFFFF $buttonFont = "MS Reference Sans Serif" $green = 0x667733 $darkRed = 0x800000 $nLabelColor = 0x800000 $newGUIcolor = 0xC0CCCC $softRed = 0xF08080 $addBtn = 0xF08080 $addBtnFont = 0xFFFFFFF $flag = 0 $kontax = @ScriptDir & "/data/kontax.txt" $listview = GuiCtrlCreateListView ("Name|Phone|Mobile|Email|House/Street|Town|Postcode|Details|Notes",1,24,@DesktopWidth-2,@DesktopHeight-74);,$LVS_SORTDESCENDING) GUICtrlSetBkColor ($listview,$green) GUICtrlSetFont($listview, 12, 500) GUICtrlSetColor($listview,0xFFFFFF) $listViewStyle = BitOR($LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT) GUICtrlSetStyle($listview, $LVS_REPORT, $listViewStyle) For $i = 0 To 7 Step 1 _GUICtrlListView_SetColumnWidth ($listview, $i, @DesktopWidth/9) Next _GUICtrlListView_SetColumnWidth ($listview, 8, @DesktopWidth*8/9) $button1 = GuiCtrlCreateButton ("List",1,1,@DesktopWidth/10,22, $BS_FLAT) $button2 = GuiCtrlCreateButton ("Add",@DesktopWidth/10 +2,1,@DesktopWidth/10 ,22, $BS_FLAT) $button3 = GuiCtrlCreateButton ("Modify",@DesktopWidth*2/10 +3,1,@DesktopWidth/10,22, $BS_FLAT) $button4 = GuiCtrlCreateButton ("Copy",@DesktopWidth*3/10 +4,1,@DesktopWidth/10,22, $BS_FLAT) $button5 = GuiCtrlCreateButton ("Sort",@DesktopWidth*4/10 +5,1,@DesktopWidth/10,22, $BS_FLAT) $button6 = GuiCtrlCreateButton ("Search",@DesktopWidth*5/10 +6,1,@DesktopWidth/10,22, $BS_FLAT) $button7 = GuiCtrlCreateButton ("Select None",@DesktopWidth*6/10 +7,1,@DesktopWidth/10,22, $BS_FLAT) $button8 = GuiCtrlCreateButton ("Delete",@DesktopWidth*7/10 +8,1,@DesktopWidth/10,22, $BS_FLAT) GUICtrlSetBkColor($button1,$buttonColor) GUICtrlSetBkColor($button2,$buttonColor) GUICtrlSetBkColor($button3,$buttonColor) GUICtrlSetBkColor($button4,$buttonColor) GUICtrlSetBkColor($button5,$buttonColor) GUICtrlSetBkColor($button6,$buttonColor) GUICtrlSetBkColor($button7,$buttonColor) GUICtrlSetBkColor($button8,$buttonColor) GUICtrlSetColor($button1,$buttonText) GUICtrlSetColor($button2,$buttonText) GUICtrlSetColor($button3,$buttonText) GUICtrlSetColor($button4,$buttonText) GUICtrlSetColor($button5,$buttonText) GUICtrlSetColor($button6,$buttonText) GUICtrlSetColor($button7,$buttonText) GUICtrlSetColor($button8,$buttonText) GUICtrlSetFont($button1, 9, 500, 2, $buttonFont) GUICtrlSetFont($button2, 9, 500, 2, $buttonFont) GUICtrlSetFont($button3, 9, 500, 2, $buttonFont) GUICtrlSetFont($button4, 9, 500, 2, $buttonFont) GUICtrlSetFont($button5, 9, 500, 2, $buttonFont) GUICtrlSetFont($button6, 9, 500, 2, $buttonFont) GUICtrlSetFont($button7, 9, 500, 2, $buttonFont) GUICtrlSetFont($button8, 9, 500, 2, $buttonFont) GuiSetState() While 1 $msg = GuiGetMsg () Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button1 _getContactsList() Case $msg = $button6 _search() Case $msg = $button7 _GUICtrlListView_SetItemSelected ( $listview, -1 , 0) Case $msg = $button2 _new() Case $msg = $button3 $string = GUICtrlRead(GUICtrlRead($listview)) $index = _GUICtrlListView_GetNextItem($listview) If StringLen($string) > 8 Then $flag = 1 _new() $flag = 0 Else MsgBox(32, "???", "Nothing selected!", 5) EndIf Case $msg = $button4 _copy() Case $msg = $button8 $selected = _GUICtrlListView_GetSelectedCount ($listview) If $selected > 0 Then $confirm = MsgBox(262420, "Confirm Delete", "Are you sure you want to delete the selected items?" & @CRLF & "This action can't be undone.") If $confirm = 6 Then _delete() Else GUICtrlSetState ( $listview, $GUI_FOCUS ) EndIf Else MsgBox(32, "???", "Nothing selected!", 5) EndIf Case $msg = $button5 Dim $B_DESCENDING[_GUICtrlListView_GetColumnCount ($listview) ] _GUICtrlListView_SimpleSort ( $listview, $B_DESCENDING, 0 ) _GUICtrlListView_SetItemSelected ( $listview, -1 , 0) EndSelect WEnd Func _new() If $flag = 0 Then $GUI_Name = "Add Contact" $action = "Add" ElseIf $flag = 1 Then $GUI_Name = "Modify" $action = "Modify" EndIf $newGUI = GUICreate ( $GUI_Name , 488 , 238 , 100 , 100 , -1 , -1 , $parent ) GUISetBkColor($newGUIcolor, $newGUI) $nName = GUICtrlCreateInput("", 80, 7, 400, 20) GUICtrlSetColor($nName, $darkRed) GUICtrlSetFont($nName, 10, 500) $label_nName = GUICtrlCreateLabel("Name", 10, 10, 70, 20) GUICtrlSetColor($label_nName, $nLabelColor) GUICtrlSetFont($label_nName, 10,500) $nPhone = GUICtrlCreateInput("", 80, 29, 400, 20) GUICtrlSetColor($nPhone, $darkRed) GUICtrlSetFont($nPhone, 10, 500) $label_nPhone = GUICtrlCreateLabel("Phone", 10, 32, 70, 20) GUICtrlSetColor($label_nPhone, $nLabelColor) GUICtrlSetFont($label_nPhone, 10,500) $nMobile = GUICtrlCreateInput("", 80, 51, 400, 20) GUICtrlSetColor($nMobile, $darkRed) GUICtrlSetFont($nMobile, 10, 500) $label_nMobile = GUICtrlCreateLabel("Mobile", 10, 54, 70, 20) GUICtrlSetColor($label_nMobile, $nLabelColor) GUICtrlSetFont($label_nMobile, 10,500) $nEmail = GUICtrlCreateInput("", 80, 73, 400, 20) GUICtrlSetColor($nEmail, $darkRed) GUICtrlSetFont($nEmail, 10, 500) $label_nEmail = GUICtrlCreateLabel("Email", 10, 76, 70, 20) GUICtrlSetColor($label_nEmail, $nLabelColor) GUICtrlSetFont($label_nEmail, 10,500) $nHouse = GUICtrlCreateInput("", 80, 95, 400, 20) GUICtrlSetColor($nHouse, $darkRed) GUICtrlSetFont($nHouse, 10, 500) $label_nHouse = GUICtrlCreateLabel("House", 10, 98, 70, 20) GUICtrlSetColor($label_nHouse, $nLabelColor) GUICtrlSetFont($label_nHouse, 10,500) $nTown = GUICtrlCreateInput("", 80, 117, 400, 20) GUICtrlSetColor($nTown, $darkRed) GUICtrlSetFont($nTown, 10, 500) $label_nTown = GUICtrlCreateLabel("Town", 10, 120, 70, 20) GUICtrlSetColor($label_nTown, $nLabelColor) GUICtrlSetFont($label_nTown, 10,500) $nPostCode = GUICtrlCreateInput("", 80, 139, 400, 20) GUICtrlSetFont($nPostCode, 10, 500) GUICtrlSetColor($nPostCode, $darkRed) $label_nPostCode = GUICtrlCreateLabel("Postcode", 10, 142, 65, 20) GUICtrlSetColor($label_nPostCode, $nLabelColor) GUICtrlSetFont($label_nPostCode, 10,500) $nDetails = GUICtrlCreateInput("", 80, 161, 400, 20) GUICtrlSetColor($nDetails, $darkRed) GUICtrlSetFont($nDetails, 10, 500) $label_nDetails = GUICtrlCreateLabel("Details", 10, 164, 70, 20) GUICtrlSetColor($label_nDetails, $nLabelColor) GUICtrlSetFont($label_nDetails, 10,500) $nNotes = GUICtrlCreateInput("", 80, 183, 400, 20) GUICtrlSetColor($nNotes, $darkRed) GUICtrlSetFont($nNotes, 10, 500) $label_nNotes = GUICtrlCreateLabel("Notes", 10, 186, 70, 20) GUICtrlSetColor($label_nNotes, $nLabelColor) GUICtrlSetFont($label_nNotes, 10,500) $btn_clear = GuiCtrlCreateButton ("Clear",150,210,90,22, $BS_FLAT) $btn_add = GuiCtrlCreateButton ($action,259,210,90,22, $BS_FLAT) $btn_close = GuiCtrlCreateButton ("Close",368,210,90,22, $BS_FLAT) If $flag = 1 Then $data = StringSplit($string, "|") GUICtrlSetData($nName ,$data[1]) GUICtrlSetData($nPhone ,$data[2]) GUICtrlSetData($nMobile ,$data[3]) GUICtrlSetData($nEmail ,$data[4]) GUICtrlSetData($nHouse ,$data[5]) GUICtrlSetData($nTown ,$data[6]) GUICtrlSetData($nPostCode ,$data[7]) GUICtrlSetData($nDetails ,$data[8]) GUICtrlSetData($nNotes ,$data[9]) EndIf GUISetState(@SW_SHOW) GUISwitch($parent) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $btn_close Then GUISwitch($newGUI) GUIDelete() ExitLoop EndIf If $msg = $btn_clear Then GUICtrlSetData($nName ,"") GUICtrlSetData($nPhone ,"") GUICtrlSetData($nMobile ,"") GUICtrlSetData($nEmail ,"") GUICtrlSetData($nHouse ,"") GUICtrlSetData($nTown ,"") GUICtrlSetData($nPostCode ,"") GUICtrlSetData($nDetails ,"") GUICtrlSetData($nNotes ,"") EndIf If $msg = $btn_add Then $nItem = GUICtrlRead($nName) & "|" $nItem &= GUICtrlRead($nPhone) & "|" $nItem &= GUICtrlRead($nMobile) & "|" $nItem &= GUICtrlRead($nEmail) & "|" $nItem &= GUICtrlRead($nHouse) & "|" $nItem &= GUICtrlRead($nTown) & "|" $nItem &= GUICtrlRead($nPostCode) & "|" $nItem &= GUICtrlRead($nDetails) & "|" $nItem &= GUICtrlRead($nNotes) If StringLen($nItem) > 8 And $flag = 0 Then _GUICtrlListView_SetItemSelected ( $listview, -1 , 0) GuiCtrlCreateListViewItem($nItem ,$listview) FileWriteLine($kontax, $nItem) ElseIf StringLen($nItem) > 8 Then Dim $fileArray $modified = StringSplit($nItem, "|") _FileReadToArray($kontax, $fileArray) $n = _ArraySearch($fileArray, $string, 0, 0, 1, True) $fileArray[$n] = $nItem _FileWriteFromArray($kontax, $fileArray, 1) For $i = 0 To 8 Step 1 _GUICtrlListView_SetItemText ( $listview, $index, $i, $modified[$i+1] ) Next $string = $nItem EndIf EndIf WEnd GUICtrlSetState ( $listview, $GUI_FOCUS ) EndFunc Func _getContactsList() Dim $av_Array _FileReadToArray($kontax, $av_Array) _GUICtrlListView_DeleteAllItems($listview) For $i = 1 To UBound($av_Array) - 1 Step 1 GuiCtrlCreateListViewItem($av_Array[$i] ,$listview) Next EndFunc Func _delete() Local $a_indices = _GUICtrlListView_GetSelectedIndices($listview,1), $tempFile _FileReadToArray($kontax, $tempFile) If(IsArray($a_indices))Then Local $i For $i = 1 To $a_indices[0] $kIndex = _ArraySearch($tempFile, _GUICtrlListView_GetItemTextString ($listview, $a_indices[$i]), 1, 0, 1, True) _ArrayDelete($tempFile, $kIndex) Next _FileWriteFromArray($kontax, $tempFile, 1) _GUICtrlListView_DeleteItemsSelected ($listview) EndIf EndFunc Func _search() $GUI_Name = "Search" $newGUI = GUICreate ( $GUI_Name , 360 , 105 , 100 , 100 , -1 , -1 , $parent ) GUISetBkColor($newGUIcolor, $newGUI) $label_1 = GUICtrlCreateLabel("Find what?", 10, 7, 200, 20) GUICtrlSetColor($label_1, $nLabelColor) GUICtrlSetFont($label_1, 10,500) $sRecords = GUICtrlCreateInput("", 10, 32, 340, 20) GUICtrlSetColor($sRecords, $darkRed) GUICtrlSetFont($sRecords, 10, 500) $checkBox = GUICtrlCreateCheckbox(" Match case", 10, 65, 110) GUICtrlSetColor($checkBox, $darkRed) GUICtrlSetFont($checkBox, 10, 500) $btn_search = GuiCtrlCreateButton ("Search",130,65,100,24, $BS_FLAT) $btn_close = GuiCtrlCreateButton ("Close",250,65,100,24, $BS_FLAT) GUISetState(@SW_SHOW) GUISwitch($parent) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $btn_close Then GUISwitch($newGUI) GUIDelete() GUICtrlSetState ( $listview, $GUI_FOCUS ) ExitLoop EndIf If $msg = $btn_search Then $find = GUICtrlRead($sRecords) $tick = GUICtrlRead($checkBox) If $tick = 1 Then $case = 1 Else $case = 0 EndIf Dim $records, $sResult[1] _FileReadToArray($kontax, $records) For $i = 1 To UBound($records) -1 Step 1 If StringInStr($records[$i], $find, $case) Then _ArrayAdd($sResult, $records[$i]) EndIf Next If UBound($sResult) > 1 Then _GUICtrlListView_DeleteAllItems($listview) For $i = 1 To UBound($sResult) - 1 Step 1 GuiCtrlCreateListViewItem($sResult[$i] ,$listview) Next Else MsgBox(262208, "Search Result", "Could not find" [email="&@CRLF"]&@CRLF[/email] &$find) EndIf EndIf WEnd EndFunc Func _copy() Dim $selection = _GUICtrlListView_GetSelectedIndices ($listview , 1), $clipboard If UBound($selection) > 1 Then For $i = 1 To $selection[0] Step 1 $return = _GUICtrlListView_GetItemTextString ( $listview , $selection[$i]) $return = StringReplace($return, "|", @TAB) $clipboard &= $return [email="&@CRLF"]&@CRLF[/email] Next ClipPut($clipboard) Else MsgBox(32, "???", "Nothing selected!", 5) EndIf GUICtrlSetState ( $listview, $GUI_FOCUS ) EndFunc
  19. I agree phrase by phrase and sentence by sentence will be the best way to translate..
  20. Yes, very good.. I was only commenting cause one would just need to provision code to work also on exclamation, question marks, and such.. But anyone can do that for themself. Thank you for sharing your fine efforts... I like it!
  21. This is really cool! I see it only works with a period though. Really great job!
  22. Not a problem, I just wanted to let ya know about the different os.. Might be really cool when or if you add vista support..
  23. Hello, It desn't do anything on vista X64. Just opend an empty gui. I compiled and same thing...
  24. Gotcha! Looks nice
  25. Great job! I had to comment out line 1290 ;_WinAPI_DestroyIcon($hIcon) to make it work.. Works good tho...
×
×
  • Create New...