z0mgItsJohn Posted December 10, 2007 Share Posted December 10, 2007 (edited) Hello.. Are You Tired Of Typing The Same Web Address Over And Over? Well With My New Program All You Got To Do Is Set Your 10 Most Visited Sites Once And Then You Have An Option To Goto Any Of Them 10 Websites =] Part One - Setup =] ~ "You Must Run This Before You Use The Program" expandcollapse popup#Include <GuiConstants.au3> #NoTrayIcon Opt('GUIOnEventMode', 1) $Delete_Ini = FileDelete ( "Website_Set.ini" ) $GUI_Title = GuiCreate(" Auto Website v1.0 - Website Set", 350, 320) $Set_Exit = GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') $Input_1 = GUICtrlCreateInput ( "", 90,30, 200, 20) $Label_Input_1 = GUICtrlCreateLabel ( "Website 1 =" ,19,31) $Input_2 = GUICtrlCreateInput ( "", 90,55, 200, 20) $Label_Input_2 = GUICtrlCreateLabel ( "Website 2 =" ,19,57) $Input_3 = GUICtrlCreateInput ( "", 90,80, 200, 20) $Label_Input_3 = GUICtrlCreateLabel ( "Website 3 =" ,19,82) $Input_4 = GUICtrlCreateInput ( "", 90,105, 200, 20) $Label_Input_4 = GUICtrlCreateLabel ( "Website 4 =" ,19,107) $Input_5 = GUICtrlCreateInput ( "", 90,130, 200, 20) $Label_Input_5 = GUICtrlCreateLabel ( "Website 5 =" ,19,132) $Input_6 = GUICtrlCreateInput ( "", 90,155, 200, 20) $Label_Input_6 = GUICtrlCreateLabel ( "Website 6 =" ,19,157) $Input_7 = GUICtrlCreateInput ( "", 90,180, 200, 20) $Label_Input_7 = GUICtrlCreateLabel ( "Website 7 =" ,19,182) $Input_8 = GUICtrlCreateInput ( "", 90,205, 200, 20) $Label_Input_8 = GUICtrlCreateLabel ( "Website 8 =" ,19,207) $Input_9 = GUICtrlCreateInput ( "", 90,230, 200, 20) $Label_Input_9 = GUICtrlCreateLabel ( "Website 9 =" ,19,232) $Input_10 = GUICtrlCreateInput ( "", 90,255, 200, 20) $Label_Input_10 = GUICtrlCreateLabel ( "Website 10 =" ,19,257) $Button1 = GuiCtrlCreateButton("Finish", 150,285,65,25) $Set_Button_1 = GUICtrlSetOnEvent(-1, 'Finish') $GUI_State = GuiSetState(@SW_SHOW) Func Finish() IniWrite ( "Website_Set.ini", "Website_1" ,"Set_1", GUICtrlRead($Input_1) ) IniWrite ( "Website_Set.ini", "Website_2" ,"Set_2", GUICtrlRead($Input_2) ) IniWrite ( "Website_Set.ini", "Website_3" ,"Set_3", GUICtrlRead($Input_3) ) IniWrite ( "Website_Set.ini", "Website_4" ,"Set_4", GUICtrlRead($Input_4) ) IniWrite ( "Website_Set.ini", "Website_5" ,"Set_5", GUICtrlRead($Input_5) ) IniWrite ( "Website_Set.ini", "Website_6" ,"Set_6", GUICtrlRead($Input_6) ) IniWrite ( "Website_Set.ini", "Website_7" ,"Set_7", GUICtrlRead($Input_7) ) IniWrite ( "Website_Set.ini", "Website_8" ,"Set_8", GUICtrlRead($Input_8) ) IniWrite ( "Website_Set.ini", "Website_9" ,"Set_9", GUICtrlRead($Input_9) ) IniWrite ( "Website_Set.ini", "Website_10" ,"Set_10", GUICtrlRead($Input_10) ) Exit EndFunc While 1 Sleep(100) WEnd Func _Exit() Exit EndFuncoÝ÷ Øú趦ëhYæìׯ×@r&g9«¢+Ø%¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(9½QÉå%½¸)=ÁÐ ÌäíU%=¹Ù¹Ñ5½Ìäì°Ä¤((ÀÌØí%¹¥ ¡¬ô¥±á¥ÍÑÌ ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì¤()%ÀÌØí%¹¥ ¡¬ôÀQ¡¸)5Í ½à ÄØ°ÅÕ½ÐíÕѼ]Í¥ÑØĸÀ´¥±ÉɽÈÅÕ½Ðì°ÅÕ½ÐíA±ÍIÕ¸MÑÕÀ¹QÉ䥸ÅÕ½Ðì°À¤)á¥Ð)¹%((ÀÌØíU%}Q¥Ñ±ôÕ¥ ÉÑ ÅÕ½ÐìÕѼ]Í¥ÑĸÀÅÕ½Ðì°ÈÀÀ°ÈÐ̤(ÀÌØíMÑ}á¥ÐôU%MÑ=¹Ù¹Ð ÀÌØíU%}Y9Q} 1=M°Ìäí}á¥ÐÌäì¤(ÀÌØíɽÕÁ|ÄôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°È°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÄôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÄÅÕ½Ðì°ÄÔ°ÄÈ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÄôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÄÌäì¤(ÀÌØíɽÕÁ|ÈôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀØ°È°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÈôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÈÅÕ½Ðì°ÄÄÄ°ÄÈ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÈôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÈÌäì¤(ÀÌØíɽÕÁ|ÌôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°Ðä°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÌôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÌÅÕ½Ðì°ÄÔ°Ôä°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÌôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÌÌäì¤(ÀÌØíɽÕÁ|ÐôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀØ°Ðä°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÐôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÐÅÕ½Ðì°ÄÄÄ°Ôä°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÐôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÐÌäì¤(ÀÌØíɽÕÁ|ÔôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°äØ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÔôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÔÅÕ½Ðì°ÄÔ°ÄÀØ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÔôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÔÌäì¤(ÀÌØíɽÕÁ|ØôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀØ°äØ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ØôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑØÅÕ½Ðì°ÄÄÄ°ÄÀØ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ØôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ØÌäì¤(ÀÌØíɽÕÁ|ÜôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÐÌ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÜôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÜÅÕ½Ðì°ÄÔ°ÄÔÌ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÜôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÜÌäì¤(ÀÌØíɽÕÁ|àôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀØ°ÄÐÌ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|àôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑàÅÕ½Ðì°ÄÄÄ°ÄÔÌ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|àôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|àÌäì¤(ÀÌØíɽÕÁ|äôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄäÀ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|äôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑäÅÕ½Ðì°ÄÔ°ÈÀÀ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|äôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|äÌäì¤(ÀÌØíɽÕÁ|ÄÀôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐìÅÕ½Ðì°ÄÀØ°ÄäÀ°àÔ°ÐÔ¤(ÀÌØí ÕÑѽ¹|ÄÀôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí]Í¥ÑÄÀÅÕ½Ðì°ÄÄÄ°ÈÀÀ°ÜÔ°ÌÀ¤(ÀÌØíMÑ} ÕÑѽ¹|ÄÀôU% ÑɱMÑ=¹Ù¹Ð ´Ä°Ìäí]Í¥Ñ|ÄÀÌäì¤(ÀÌØíU%}MÑÑôÕ¥MÑMÑÑ¡M]}M!=¤((ÀÌØí]Í¥Ñ}I|Äô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÄÅÕ½Ðì°ÅÕ½ÐíMÑ|ÄÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Èô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÈÅÕ½Ðì°ÅÕ½ÐíMÑ|ÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Ìô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÌÅÕ½Ðì°ÅÕ½ÐíMÑ|ÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Ðô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÐÅÕ½Ðì°ÅÕ½ÐíMÑ|ÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Ôô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÔÅÕ½Ðì°ÅÕ½ÐíMÑ|ÔÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Øô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ØÅÕ½Ðì°ÅÕ½ÐíMÑ|ØÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|Üô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÜÅÕ½Ðì°ÅÕ½ÐíMÑ|ÜÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|àô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|àÅÕ½Ðì°ÅÕ½ÐíMÑ|àÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|äô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|äÅÕ½Ðì°ÅÕ½ÐíMÑ|äÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØí]Í¥Ñ}I|ÄÀô%¹¥I ÅÕ½Ðí]Í¥Ñ}Mй¥¹¤ÅÕ½Ðì°ÅÕ½Ðí]Í¥Ñ|ÄÀÅÕ½Ðì°ÅÕ½ÐíMÑ|ÄÀÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤()]¡¥±Ä)M±À ÄÀÀ¤)]¹()Õ¹]Í¥Ñ|Ä ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|Ä°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|È ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|È°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|Ì ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|Ì°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|Ð ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|аÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|Ô ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|Ô°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|Ø ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|Ø°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|Ü ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|Ü°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|à ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|à°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|ä ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|ä°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹]Í¥Ñ|ÄÀ ¤)IÕ¸ ÅÕ½Ðíµ½ÍÑÉÐÅÕ½ÐìµÀìÀÌØí]Í¥Ñ}I|ÄÀ°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤)¹Õ¹()Õ¹}á¥Ð ¤)á¥Ð)¹Õ¹ All Credits Goto Me... Well.. Please Leave Comments.. Report Bugs.. New Ideals Ect. And Please.. Do Not Take Credit For My Work =[ Well Please Enjoy O.. And Don't Comment About The Way The Program Runs A Website ~ And If You Have Any Questions Post Them Or Add Me On Msn At 'maxell225@hotmail.com' Edited December 10, 2007 by John2006 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Zepx Posted December 10, 2007 Share Posted December 10, 2007 Erm.. why do you need to repeat the functions so many times.. just make all of them call the same function... since it does the same thing. Link to comment Share on other sites More sharing options...
weaponx Posted December 10, 2007 Share Posted December 10, 2007 (edited) Here is a simpler implementation of the first script: #Include <GuiConstants.au3> #NoTrayIcon Opt('GUIOnEventMode', 1) $Delete_Ini = FileDelete ( "Website_Set.ini" ) $GUI_Title = GuiCreate(" Auto Website v1.0 - Website Set", 350, 320) $Set_Exit = GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') Dim $array[10][2] For $X = 0 to 9 $array[$X][0] = GUICtrlCreateInput ( "", 90,30 + ($X * 25), 200, 20) $array[$X][1] = GUICtrlCreateLabel ( "Website " & ($X + 1) & " =" ,15,31 + ($X * 26)) Next $Button1 = GuiCtrlCreateButton("Finish", 150,285,65,25) $Set_Button_1 = GUICtrlSetOnEvent(-1, 'Finish') $GUI_State = GuiSetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Finish() For $X = 1 to 10 IniWrite ( "Website_Set.ini", "Website_" & $X,"Set_" & $X, GuiCtrlRead($array[$X][0])) Next Exit EndFunc Func _Exit() Exit EndFunc EDIT: Mistake in IniWrite() Edited December 10, 2007 by weaponx Link to comment Share on other sites More sharing options...
smashly Posted December 10, 2007 Share Posted December 10, 2007 IniWrite ( "Website_Set.ini", "Website_" & $X,"Set_" & $X, $array[$X][0])Shouldn't that be... IniWrite ( "Website_Set.ini", "Website_" & $X,"Set_" & $X, GUICtrlRead($array[$X][0])) Cheers Link to comment Share on other sites More sharing options...
weaponx Posted December 10, 2007 Share Posted December 10, 2007 Shouldn't that be... IniWrite ( "Website_Set.ini", "Website_" & $X,"Set_" & $X, GUICtrlRead($array[$X][0])) Cheers You are correct, I fixed it. Thats what I get for not testing. Link to comment Share on other sites More sharing options...
themax90 Posted December 10, 2007 Share Posted December 10, 2007 (edited) Part One - Setup =] ~ "You Must Run This Before You Use The Program" I noticed in this script you provided a Finish function - why not try to make that a save? That would help users - and try to integrate it into the same program that way you can set options without needing to run any other 3rd party programs. ~Smith P.S. Great for a first script! Edited December 10, 2007 by AutoIt Smith Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 10, 2007 Author Share Posted December 10, 2007 (edited) There Is Still An Error In Your New Version Of Setup Script Even With The New IniWrite =O #Include <GuiConstants.au3> #NoTrayIcon Opt('GUIOnEventMode', 1) $Delete_Ini = FileDelete ( "Website_Set.ini" ) $GUI_Title = GuiCreate(" Auto Website v1.0 - Website Set", 350, 320) $Set_Exit = GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') Dim $array[10][2] For $X = 0 to 9 $array[$X][0] = GUICtrlCreateInput ( "", 90,30 + ($X * 25), 200, 20) $array[$X][1] = GUICtrlCreateLabel ( "Website " & ($X + 1) & " =" ,15,31 + ($X * 26)) Next $Button1 = GuiCtrlCreateButton("Finish", 150,285,65,25) $Set_Button_1 = GUICtrlSetOnEvent(-1, 'Finish') $GUI_State = GuiSetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Finish() For $X = 1 to 10 IniWrite ( "Website_Set.ini", "Website_" & $X,"Set_" & $X, GUICtrlRead($array[$X][0])) Next Exit EndFunc Func _Exit() Exit EndFunc Edited December 10, 2007 by John2006 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 10, 2007 Author Share Posted December 10, 2007 (edited) Erm.. why do you need to repeat the functions so many times.. just make all of them call the same function... since it does the same thing.... Each Function Runs A Different Website.. So There For There Is 10.. Edited December 10, 2007 by John2006 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
smashly Posted December 11, 2007 Share Posted December 11, 2007 Hi John2006, for your first scripts (well it is 2 scripts) it's a good effort, it's easy to read and understand. Suggestions: Add some way of identifying the website associated with each button. (Maybe a toolTip?) (When I have 10 websites I can't remember which is on what button.) Combine the 2 scripts together so it's just one program Refine your code so your not using 10 of the same functions to do the same thing: Here's modded weaponx's code (fixes the wrong amount of Ini entries)expandcollapse popup#Include <GuiConstants.au3> #NoTrayIcon Opt('GUIOnEventMode', 1) $Delete_Ini = FileDelete ( "Website_Set.ini" ) $GUI_Title = GuiCreate(" Auto Website v1.0 - Website Set", 350, 320) $Set_Exit = GUISetOnEvent($GUI_EVENT_CLOSE, 'Finish') Dim $array[11] For $X = 1 to 10 $array[$X] = GUICtrlCreateInput ( "", 90, $x * 25, 200, 20) GUICtrlCreateLabel ( "Website " & $X & " =" , 15, ($X * 25) + 3) Next $Button1 = GuiCtrlCreateButton("Finish", 150,285,65,25) $Set_Button_1 = GUICtrlSetOnEvent(-1, 'Finish') $GUI_State = GuiSetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Finish() For $X = 1 to 10 IniWrite ("Website_Set.ini", "Website_" & $X,"Set_" & $X, GuiCtrlRead($array[$X])) Next Exit EndFuncoÝ÷ Øw«{lÊ«¨§±Êâ¦Øî²ÙuæÛ&jY^¯«h¢[b¥§]yÛhnëm¢{-«aj÷Áæì׺Ú"µÍÒ[ÛYH ÑÝZPÛÛÝ[Ë]LÉÝÂÓÕ^RXÛÛÜ ÌÎNÑÕRSÛ][[ÙIÌÎNËJBYÝ[Q^ÝÊ ][ÝÕÙXÚ]WÔÙ][I][ÝÈ H[SÙÐÞ M ][ÝÐ]]ÈÙXÚ]HKH[HÜ][ÝË ][ÝÔXÙH[Ù][HYØZ[][ÝË BQ^][YÌÍÑÕRWÕ]HHÝZPÜX]J ][ÝÈ]]ÈÙXÚ]HK ][ÝËÊB[H ÌÍØ^VÌLWBØØ[ ÌÍØHMK ÌÍØHHLÜ ÌÍÞHHÈLQÕRPÝÜX]QÜÝ ][ÝÉ][ÝË ÌÍØH K ÌÍØHHL K JBIÌÍØ^VÉÌÍÞHHÕRPÝÜX]P]Û ][ÝÕÙXÚ]H ][ÝÈ [È ÌÍÞ ÌÍØ ÌÍØK ÍKÌ BQÕRPÝÙ]Û][ LK ][ÝÕÙXÚ]I][ÝÊBQÕRPÝÙ] LK[TXY ][ÝÕÙXÚ]WÔÙ][I][ÝË ][ÝÕÙXÚ]WÉ][ÝÈ [È ÌÍÞ ][ÝÔÙ]É][ÝÈ [È ÌÍÞ ][ÝÉ][ÝÊJBIÌÍØ ÏHMRYÝ[Ù ÌÍÞH[BIÌÍØHMBBIÌÍØH ÏH ÂQ[Y^ÕRTÙ]Û][ ÌÍÑÕRWÑUSÐÓÔÑK ÌÎN×Ñ^] ÌÎNÊBÝZTÙ]Ý]JÕ×ÔÒÕÊBÚ[HBTÛY L BÑ[[ÈÙXÚ]J BQÜ ÌÍÞHHÈLBRYÕRWÐÝYH ÌÍØ^VÉÌÍÞH[Ú[^XÝ]J[TXY ][ÝÕÙXÚ]WÔÙ][I][ÝË ][ÝÕÙXÚ]WÉ][ÝÈ [È ÌÍÞ ][ÝÔÙ]É][ÝÈ [È ÌÍÞ ][ÝÉ][ÝÊJBS^[[Â[ÈÑ^] BQ^][[ Cheers Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 11, 2007 Author Share Posted December 11, 2007 Nice.. But One Error.. You Linked Exit To The Finish Func.. Bad Ideal.. Because If Some One Wants To Exit It Makes The Ini File =P So I Just Re-Added _Exit Func And Linked It Back =) Well Nice Job.. =) P.S I'm Working On A System To Tell You Which Website Is Which =) Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
smashly Posted December 11, 2007 Share Posted December 11, 2007 (edited) Nice.. But One Error.. You Linked Exit To The Finish Func.. Bad Ideal.. Because If Some One Wants To Exit It Makes The Ini File =PThat was done by design Which leads me to another suggestion: When launching the first script instead of deleting the prior ini.. Load the old ini values into the Website input fields so a user can edit the one they want.. Atm it blows that if I want to edit one url that I have enter all 10 again if I open your setup script. Cheers Edit: here's the load ini part I mentioned. So now it seems a good idea to have exit as a seprate function as you were saying.expandcollapse popup#Include <GuiConstants.au3> #NoTrayIcon Opt('GUIOnEventMode', 1) Global $Ini = @ScriptDir & "\Website_Set.ini" $GUI_Title = GuiCreate(" Auto Website v1.0 - Website Set", 350, 320) $Set_Exit = GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') Dim $array[11] For $X = 1 to 10 $array[$X] = GUICtrlCreateInput ( "", 90, $x * 25, 200, 20) GUICtrlCreateLabel ( "Website " & $X & " =" , 15, ($X * 25) + 3) Next $Button1 = GuiCtrlCreateButton("Save", 150,285,65,25) $Set_Button_1 = GUICtrlSetOnEvent(-1, 'Finish') GuiSetState(@SW_SHOW) _LoadIni() While 1 Sleep(100) WEnd Func _LoadIni() If FileExists($Ini) Then Dim $IRSN = IniReadSectionNames($Ini) If Not @error Then For $i = 1 To $IRSN[0] Dim $IRS = IniReadSection($Ini, $IRSN[$i]) For $h = 1 To $IRS[0][0] If Not @error = 1 Then GUICtrlSetData($array[$i], $IRS[$h][1]) Next Next EndIf EndIf EndFunc Func Finish() For $X = 1 to 10 IniWrite ($Ini, "Website_" & $X,"Set_" & $X, GuiCtrlRead($array[$X])) Next Exit EndFunc Func _Exit() Exit EndFunc Edited December 11, 2007 by smashly Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 11, 2007 Author Share Posted December 11, 2007 Check Out Auto Website v1.1 =] Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now