chie
Active Members-
Posts
93 -
Joined
-
Last visited
chie's Achievements
Wayfarer (2/7)
0
Reputation
-
I made this for mycelf & im pretty happy with it at the moment,try it out. #include <GUIConstants.au3> #include <Date.au3> Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown global $song, $Go, $Tray_exititem_item, $Secs, $Mins, $Hour, $time_,$rest_time_window ;~ Gui 1 ;~ ------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("Alarm", 400, 100) $slider = GUICtrlCreateSlider (190,70,200,20,$TBS_NOTICKS) ;Slider GUICtrlSetLimit(-1,100,0) ; change min/max value GUICtrlSetData(-1,_SoundGetWaveVolume()) ; set cursor ;~ ------------------------------------------------------------------------------------------------------- $browse = GUICtrlCreateButton("Browse", 5, 10, 50, 20) ;Browse Button $start = GUICtrlCreateButton("Start", 5, 34, 50, 20) ;Browse Button $e1 = GUICtrlCreateInput("", 60, 10, 330, 20) ;Are Where the chosen song is displayed ;~ ------------------------------------------------------------------------------------------------------- $iniread_Hour = IniRead("C:\myfile.ini", "Alarm", "hour","") $iniread_Min = IniRead("C:\myfile.ini", "Alarm", "min","") $input_ALARM_data = GUICtrlCreateCombo ($iniread_Hour, 60,70,40, 20) ; create first item GUICtrlSetData(-1,"00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24",$iniread_Hour) ; add other item snd set a new default $input_ALARM_data2 = GUICtrlCreateCombo ($iniread_Min, 100,70,40, 20) ; create first item GUICtrlSetData(-1,"|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60",$iniread_Min) ; add other item snd set a new default ;~ ------------------------------------------------------------------------------------------------------- $Checkbox_RestReminder = GUICtrlCreateCheckbox("Remind to rest every 1.H", 60, 38) GUISetState(@SW_SHOW) ; makes Gui Visible ;~ Gui 2 ;~ ------------------------------------------------------------------------------------------------------- $rest_time_window = GUICreate("RestReminder", 400, 100) $font="Comic Sans MS" GUISetFont (30, 400, 1, $font) ; will display underlined characters GUICtrlCreateLabel ("TIME TO REST !!!",35,20) GUICtrlSetColor(-1,0xff) ;blue GUISetState(@SW_HIDE) ; makes Gui Visible ;~ ********************************************************************************************************* ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- $Tray_Maximize_item = TrayCreateItem("Maximize") $settingsitem = TrayCreateMenu("Rest opt.") $Enable = TrayCreateItem("Enable", $settingsitem) $Disnable = TrayCreateItem("Disable", $settingsitem) TrayCreateItem("") $Tray_exititem_item = TrayCreateItem("Exit") TraySetState(@SW_HIDE) if GUICtrlRead($Checkbox_RestReminder) = $GUI_UNCHECKED Then TraySetState(4) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func _SoundGetWaveVolume() ; get the et Wav Sound Volume (Author gafrost) Local $WaveVol = -1, $p, $ret Const $MMSYSERR_NOERROR = 0 $p = DllStructCreate ("dword") If @error Then SetError(2) Return -2 EndIf $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr ($p)) If ($ret[0] == $MMSYSERR_NOERROR) Then $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData ($p, 1), 8), 4)) / 0xFFFF * 100) Else SetError(1) EndIf $Struct=0 Return $WaveVol EndFunc;==>_SoundGetWaveVolume While 1 SoundSetWaveVolume(GUICtrlRead($slider)) ; set slider to current volume value ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $msg = GUIGetMsg() $msg1 = TrayGetMsg() Select Case $msg1 = $Tray_exititem_item Exit Case $msg = $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE,$mainwindow) GUISetState(@SW_HIDE,$rest_time_window) ;~ --------------------------------------------------------------------------------------------------------- Case $msg = $GUI_EVENT_CLOSE _CLOSEClicked() ; call _CLOSEClicked() funtion ;~ --------------------------------------------------------------------------------------------------------- Case $msg1 = $Tray_Maximize_item GUISetState(@SW_SHOW,$mainwindow) GUISetState(@SW_RESTORE,$mainwindow) ;~ -------------------------------------------------------------- ;~ Changing Tray icon modes , Blinking & not blinking case $msg1 = $Enable TraySetState(8) GUICtrlSetState($Checkbox_RestReminder,$GUI_CHECKED) case $msg1 = $Disnable TraySetState(4) GUICtrlSetState($Checkbox_RestReminder,$GUI_UNCHECKED) ;~ -------------------------------------------------------------- Case $msg = $Checkbox_RestReminder And BitAND(GUICtrlRead($Checkbox_RestReminder), $GUI_CHECKED) = $GUI_CHECKED TraySetState(8) Case $msg = $Checkbox_RestReminder And BitAND(GUICtrlRead($Checkbox_RestReminder), $GUI_UNCHECKED) = $GUI_UNCHECKED TraySetState(4) ;~ -------------------------------------------------------------- Case $msg = $browse _Browse() ; call _Browse() funtion Case $msg = $start GUISetState(@SW_HIDE,$mainwindow) AdlibEnable("_CheckTime", 60000) ; checks time every 1 minute (calls _CheckTime() function ) EndSelect WEnd Func _CLOSEClicked() ;Exit GUI function $Hwnd = WinGetHandle('') If $Hwnd = $rest_time_window Then GUISetState(@SW_HIDE,$rest_time_window) ElseIf $Hwnd = $mainwindow Then Exit EndIf ;~ SoundSetWaveVolume(50) ;if u close GUI Sleep(100) EndFunc Func _Browse() ;opens desktop after pressing Browse button & lets u choose files $song = FileOpenDialog("Play MP3/WAV sound", @DesktopDir, "MP3 sound (*.mp3;*.wav;*.wma)", 1 + 4) ;~ SoundSetWaveVolume(0) ; setting volume $mid = $song While 1 $songstr = StringInStr($mid, "\") If $songstr = 0 Then ExitLoop $mid = StringMid($mid, $songstr + 1) WEnd $sk = $mid ;Sets chosen song name into the Are Where the chosen song is displayed GUICtrlSetData($e1, $sk) ;~ AdlibEnable("_CheckTime", 60000) ; checks time every 1 minute EndFunc ;==>Browse ;Alarm settings Func _CheckTime() IniWrite("C:\myfile.ini", "Alarm", "hour",GUICtrlRead($input_ALARM_data)) IniWrite("C:\myfile.ini", "Alarm", "min",GUICtrlRead($input_ALARM_data2)) $hour = @HOUR $minute = @MIN $time_ = $hour & ":" & $minute if GUICtrlRead($Checkbox_RestReminder) = $GUI_CHECKED Then ; Reast reminder time matching If $time_ = "00:00" Then _play_it() If $time_ = "01:00" Then _play_it() If $time_ = "02:00" Then _play_it() If $time_ = "03:00" Then _play_it() If $time_ = "04:00" Then _play_it() If $time_ = "05:00" Then _play_it() If $time_ = "06:00" Then _play_it() If $time_ = "07:00" Then _play_it() If $time_ = "08:00" Then _play_it() If $time_ = "09:00" Then _play_it() If $time_ = "10:00" Then _play_it() If $time_ = "11:00" Then _play_it() If $time_ = "12:00" Then _play_it() If $time_ = "13:00" Then _play_it() If $time_ = "14:00" Then _play_it() If $time_ = "15:00" Then _play_it() If $time_ = "16:00" Then _play_it() If $time_ = "17:00" Then _play_it() If $time_ = "18:00" Then _play_it() If $time_ = "19:00" Then _play_it() If $time_ = "20:00" Then _play_it() If $time_ = "21:00" Then _play_it() If $time_ = "22:00" Then _play_it() If $time_ = "23:00" Then _play_it() EndIf If $time_ = GUICtrlRead($input_ALARM_data) & ":" & GUICtrlRead($input_ALARM_data2) Then ; if time matches play the sound ;~ ------------------------------------- GUICtrlSetData($slider,100) ; set slider to 100 & Volume = 100 then GUICtrlRead($song); read the song SoundPlay($song) ; play it ;~ ------------------------------------- EndIf EndFunc Func _play_it() ;~ ---------------------------------------------------------------------------------------- GUISetState(@SW_SHOW,$rest_time_window) GUISetState(@SW_RESTORE,$rest_time_window) GUICtrlSetData($slider,100) ; set slider to 100 & Volume = 100 then GUICtrlRead($song); read the song SoundPlay($song) ; play it Sleep(5000) if WinExists("RestReminder") Then GUISetState(@SW_HIDE,$rest_time_window) ;~ ---------------------------------------------------------------------------------------- EndFunc
-
EDIT2: All should Work now! Thank you for Reply I understand the Trick now, The mouse must move & the file name must be Pinnacle.exe or the clicker wont work....It started working, after I reinstalled Framework2.0... Well I made this Wery simple but it is wery practical & has only 5 main functions: All hotkeys can be set Custom! To start Run First pinnacle.exe 1) Move around (by holding down 1 or both mouse Buttons) 2) Pick up items & money on the ground Automatically ( By looping space key ) 2) If monster is selected = attack it (No mouseclicks are required) 4) Autoclicker (For statpoint adding) 5) User Can set His/Her own hotkeys 6) Log in when login screen is displayed (Default ALT+Enter) EXE 2 1) AOE any range skill.... Once mouse button is pressed down(by hotkey) simply press the mouse button you want to release & it will release that mouse button. & once it starts looping space the tray icon will start blinking. Used also WinMuSiN & tested it a little bit. Was working pretty nicely. I hope Her Fingers Will stop hurting now Exe & Source files are zipped [autoit]$Pinnacle = "Pinnacle" If WinExists($Pinnacle) Then MsgBox(0,"","Already Running",1) Exit ; It's already running EndIf AutoItWinSetTitle($Pinnacle) #include <GUIConstants.au3> #include <IE.au3> Opt ("MouseClickDelay", 80) Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown Opt("TrayOnEventMode",1) WinSetOnTop("MU", "", 0) ; 0 MU Window will not always be ON top( 0 = remove on top flag) if not FileExists(@ScriptDir & "/pinnacle2/config.ini") Then ; Writing Default Values into Ini file IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownLeft","{F5}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownRight","{F6}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "GetItems","{F8}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "Clicker","{F9}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "StopGetitemsAndKlicker","{F10}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "EXIT","+{esc}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "login_Hotkey","!{enter}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "Default_Mouse","Left") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE-CloseRange","{numpad1}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE-MiddleRange","{numpad2}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE-MaxRange","{numpad3}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE_Enable","!{numpadsub}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE_Disable","{numpadsub}") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "AOE_stop","{numpad0}") EndIf ; Read ini file so GUI can display read DATA $iniread_ComboKey_F5 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownLeft","") $iniread_ComboKey_F6 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownRight","") $iniread_ComboKey_F8 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "GetItems","") $iniread_ComboKey_F9 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "Clicker","") $iniread_ComboKey_F10 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "StopGetitemsAndKlicker","") $iniread_ComboKey_EXIT = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "EXIT","") $iniread_Default_Mouse = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "Default_Mouse","") $iniread_ComboKey_login = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "login","") $iniread_ComboKey_login_Hotkey = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "login_Hotkey","") HotKeySet($iniread_ComboKey_F5, "_MouseDown_Left") HotKeySet($iniread_ComboKey_F6, "_MouseDown_Right") HotKeySet($iniread_ComboKey_F8, "_GetItems") HotKeySet($iniread_ComboKey_F9, "_Clicker") HotKeySet($iniread_ComboKey_F10, "_Stop_Getitems_And_Klicker") HotKeySet($iniread_ComboKey_login_Hotkey, "_Login") HotKeySet($iniread_ComboKey_EXIT, "_EXIT") ;Shift + Esc = Exit prog ;~ MAINGUI ;~ --------------------------------------------------------------------------------------------------------- $Mainwindow = GUICreate("SaveTheMouse", 330, 270) ;Width , Hight $Button_Register_Hotkeys = GUICtrlCreateButton("Enable", 220, 10, 90, 25) ;Button1 GUICtrlSetState(-1,$GUI_DISABLE) ; disabling Button $Button_UnRegister_Hotkeys = GUICtrlCreateButton("Disable", 220, 40, 90, 25) ;Button2 ;~ --------------------------------------------------------------------------------------------------------- $Label_F5 = GUICtrlCreateLabel("MouseDown left:", 10, 10) $ComboKey_F5 = GUICtrlCreateCombo($iniread_ComboKey_F5, 110, 9, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") ;~ --------------------------------------------------------------------------------------------------------- $Label_F6 = GUICtrlCreateLabel("MouseDown Right:", 10, 36) $ComboKey_F6 = GUICtrlCreateCombo($iniread_ComboKey_F6, 110, 35, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") ;~ --------------------------------------------------------------------------------------------------------- $Label_F8 = GUICtrlCreateLabel("Get CrapOnGround:", 10, 62) $ComboKey_F8 = GUICtrlCreateCombo($iniread_ComboKey_F8, 110, 61, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") ;~ --------------------------------------------------------------------------------------------------------- $Label_F9 = GUICtrlCreateLabel("Clicker:", 10, 88) $Radio_Left = GUICtrlCreateRadio("L",47,87,25) if $iniread_Default_Mouse = "Left" Then GUICtrlSetState(-1,$GUI_CHECKED) $Radio_Right = GUICtrlCreateRadio("R",75,87,28) if $iniread_Default_Mouse = "Right" Then GUICtrlSetState(-1,$GUI_CHECKED) $ComboKey_F9 = GUICtrlCreateCombo($iniread_ComboKey_F9, 110, 87, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") ;~ --------------------------------------------------------------------------------------------------------- ;STOP & EXIT HOTKEY inputs & Lables ;~ --------------------------------------------------------------------------------------------------------- GUICtrlCreateGroup ("", 10, 115, 240, 72) ; text, left, top , width , height $Label_F10 = GUICtrlCreateLabel("- Stop GetitemsAndClicker", 117, 134) $ComboKey_F10 = GUICtrlCreateCombo($iniread_ComboKey_F10, 15, 130, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") ;~ --------------------------------------------------------------------------------------------------------- $Label_EXIT = GUICtrlCreateLabel("- EXIT = Shift+Esc", 117, 160) $ComboKey_EXIT = GUICtrlCreateCombo($iniread_ComboKey_EXIT, 15, 156, 100, 21) GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") GUICtrlCreateGroup ("",-99,-99,1,1) ;close group $Label_login = GUICtrlCreateLabel("Password:", 15, 202) $ComboKey_login = GUICtrlCreateInput($iniread_ComboKey_login, 70, 198, 80, 21) $ComboKey_login_Hotkey = GUICtrlCreateCombo($iniread_ComboKey_login_Hotkey, 150, 198, 100, 21) GUICtrlSetData(-1, "!{ENTER}|{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{NUMPAD1}|{NUMPAD2}|{NUMPAD3}|{NUMPAD4}|{NUMPAD5}|{NUMPAD6}|{NUMPAD7}|{NUMPAD8}|{NUMPAD9}|{NUMPADDIV}|{NUMPADMULT}|{NUMPADSUB}|{NUMPADADD}|{NUMPADDOT}|{SPACE}|{ENTER}|{BACKSPACE}|{DELETE}|{UP}|{DOWN}|{LEFT}|{RIGHT}|{HOME}|{END}|{ESC}|{INSERT}|{PGUP}|{PGDN}|{TAB}|{PRINTSCREEN}|{PAUSE}|{CAPSLOCK}|1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|w|x|y|z", "") GUICtrlCreateGroup ("", 50, 225, 217, 40) ; text, left, top , width , height GUICtrlCreateLabel("^ == Ctrl ! == Alt + == Shift # == Win", 60, 240) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group GUISetState(@SW_SHOW) Run(@ScriptDir & "/pinnacle2/Pinnacle.exe") ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- $Tray_Maximize_item = TrayCreateItem("Maximize") TrayItemSetOnEvent(-1,"_Maximize") $Tray_Maximize_item = TrayCreateItem("Minimize") TrayItemSetOnEvent(-1,"_Minimize") $Tray_help_item = TrayCreateItem("Help") TrayItemSetOnEvent(-1,"_Help") TrayCreateItem("") $Tray_exititem_item = TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"_EXIT") TraySetState(@SW_HIDE) ;~ ------------------------------------------------------ ;GUI Events GUISetOnEvent($GUI_EVENT_CLOSE, "_EXIT") GUISetOnEvent($GUI_EVENT_MINIMIZE, "_minimize") GUICtrlSetOnEvent($Button_Register_Hotkeys, "_Register_Hotkeys") ;If button pressed disable it GUICtrlSetOnEvent($Button_UnRegister_Hotkeys, "_UnRegister_Hotkeys") ;If button pressed enable it func _Register_Hotkeys() ;Write New Hotkeys into the ini file IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownLeft",GUICtrlRead($ComboKey_F5)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownRight",GUICtrlRead($ComboKey_F6)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "GetItems",GUICtrlRead($ComboKey_F8)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "Clicker",GUICtrlRead($ComboKey_F9)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "StopGetitemsAndKlicker",GUICtrlRead($ComboKey_F10)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "EXIT",GUICtrlRead($ComboKey_EXIT)) If GUICtrlRead($Radio_Left)= $GUI_CHECKED Then IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "Default_Mouse","Left") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "NOT_Default_Mouse","Right") EndIf If GUICtrlRead($Radio_Right)= $GUI_CHECKED Then IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "Default_Mouse","Right") IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "NOT_Default_Mouse","Left") EndIf IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "login_Hotkey",GUICtrlRead($ComboKey_login_Hotkey)) IniWrite(@ScriptDir & "/pinnacle2/config.ini", "MU", "login",GUICtrlRead($ComboKey_login)) ;~ ---------------------------------- Reading Hotkey info after writting ini file ----------------------------------- $iniread_ComboKey_F5 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownLeft","") $iniread_ComboKey_F6 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "_MouseDownRight","") $iniread_ComboKey_F8 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "GetItems","") $iniread_ComboKey_F9 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "Clicker","") $iniread_ComboKey_F10 = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "StopGetitemsAndKlicker","") $iniread_ComboKey_EXIT = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "EXIT","") $iniread_Default_Mouse = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "Default_Mouse","") $iniread_NOT_Default_Mouse = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "NOT_Default_Mouse","") $iniread_ComboKey_login = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "login","") $iniread_ComboKey_login_Hotkey = IniRead(@ScriptDir & "/pinnacle2/config.ini", "MU", "login_Hotkey","") HotKeySet($iniread_ComboKey_F5, "_MouseDown_Left") HotKeySet($iniread_ComboKey_F6, "_MouseDown_Right") HotKeySet($iniread_ComboKey_F8, "_GetItems") HotKeySet($iniread_ComboKey_F9, "_Clicker") HotKeySet($iniread_ComboKey_F10, "_Stop_Getitems_And_Klicker") HotKeySet($ComboKey_login_Hotkey, "_Login") HotKeySet($iniread_ComboKey_EXIT, "_EXIT") ;Shift + Esc = Exit prog ;~ ---------------------------------- END Reading Hotkey info after writting ini file ----------------------------------- GUICtrlSetState($Button_Register_Hotkeys,$GUI_DISABLE) ; disabling Button ;~ GUISetState(@SW_HIDE, $Mainwindow) ; Hide GUI EndFunc func _UnRegister_Hotkeys() GUICtrlSetState($Button_Register_Hotkeys,$GUI_enable) ; Enable Button HotKeySet($iniread_ComboKey_F5) HotKeySet($iniread_ComboKey_F6) HotKeySet($iniread_ComboKey_F8) HotKeySet($iniread_ComboKey_F9) HotKeySet($iniread_ComboKey_F10) HotKeySet($iniread_ComboKey_login_Hotkey) HotKeySet($iniread_ComboKey_EXIT) EndFunc func _MouseDown_Right() winwaitactive("MU") MouseDown("Right") EndFunc func _MouseDown_Left() winwaitactive("MU") MouseDown("Left") EndFunc ;~ ------------------------------------------------------ func _GetItems() ;Pick up items & money automatically TraySetState(4) ; Start Blinking while 1 winwaitactive("MU") sleep(100) controlsend("MU","","",send("{space}")) WEnd EndFunc ;~ ------------------------------------------------------ func _Clicker() ; Autoclickker (Only for mu) while (1) winwaitactive("MU") If $iniread_Default_Mouse = "Left" Then $Defaultmouse = "Left" Else $Defaultmouse = "Right" EndIf $pos = MouseGetPos() ; Get mouse current position MouseMove(($pos[0]-5), ($pos[1]-5),0) MouseClick($Defaultmouse) $pos2 = MouseGetPos() MouseMove(($pos2[0]+5), ($pos2[1]+5),0) ;move the mouse a little MouseClick($Defaultmouse) WEnd EndFunc ;~ ------------------------------------------------------ func _Stop_Getitems_And_Klicker() TraySetState(8); Stop blinking while 1 = 1 sleep(20) WEnd EndFunc ;~ ------------------------------------------------------ func _EXIT() Exit EndFunc ;~ ------------------------------------------------------ func _Help() $msgbox = Msgbox(1,"HELP:","To change Hotkeys, First, You need to Unregister them & Then Register NEW Hotkeys....Hotkeys that are not listed Hire......I dont Suggest to use them...Want More Hotkeys? Then Press OK ") If $msgbox = 1 Then _IECreate("http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm",1) ; open webpage EndFunc ;~ ------------------------------------------------------ func _Maximize() GUISetState(@SW_SHOW, $Mainwindow) GUISetState(@SW_RESTORE, $Mainwindow) EndFunc func _Minimize() GUISetState(@SW_HIDE, $Mainwindow) EndFunc func _Login() winwaitactive("MU") send($iniread_ComboKey_login) send("{enter}") EndFunc ;Just Ide Around while 1 sleep(100) WEnd MU_Clikker.rar
-
That is sad, now his fingers wont stop hurting... .Well unless he stops playing that game, but this is, to be, unlikely to happen
-
My friend found one nice online game called MuOnline ....... He played it for some time....A year....& now he has several mouses broken & his fingers are in pain...So he asked me to make small program..autoclikker..... Well I thought I chould use that travis thing & let it eat that Gameguard but it seems that only windows mode is working & none of your scripts work. Can you tell me how did you manage to make your klikker to work?
-
In your example still nothing happens if you press $Button2 or $GUI_EVENT_CLOSE or Fail->Exit while Control sending The script must be kept working in the background & if you maximize it (it must continue controlsending) & while doing so & it is maximized & you press button2 a message box must appear.(yes it will pause script but imagine GUI2 instead of a messagebox.....well its not working anyway....so the msgbox will do atm.) I continued experimenting with AdlibEnable & it almost works...well I can post an example the way it should work(But the mouse coursor should not blink the way it does atm....) Also as mutch as I figured out AdlibEnable can be used only Once per code & AdlibDisable() will close any AdlibEnable & this means that AdlibEnable cant be used to loop more that 1 function... Conclusion: this solution is no good SCROLL In the end Where many commented lines are....this is the spot I changed else is same. CODE #include <GuiConstants.au3> Opt("WinTitleMatchMode", 2) ; use any part of the window name Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown Opt("TrayOnEventMode",1) ;~ Gui Mainwindow ;~ --------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("sample", 270, 195) $Button1 = GUICtrlCreateButton("Start", 145, 55, 45, 23) ;start looping $Button2 = GUICtrlCreateButton("Button2", 195, 55, 45, 23) ;show messagebox GUISetState(@SW_SHOW, $mainwindow) ;~ File Menu START ;~ --------------------------------------------------------------------------------------------------------- $filemenu = GUICtrlCreateMenu ("&File") $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- TrayCreateItem("Show MMesgbox") TrayItemSetOnEvent(-1, "_Button2") TrayCreateItem("Maximize") TrayItemSetOnEvent(-1, "_Maximize") TrayCreateItem("EXIT") TrayItemSetOnEvent(-1, "_close") TraySetState(@SW_HIDE) Func _Button2() MsgBox(0, "", "Works") EndFunc ;~ ------------------------------------------------------ Func _Maximize() GUISetState(@SW_SHOW, $mainwindow) GUISetState(@SW_RESTORE, $mainwindow) EndFunc ;~ ------------------------------------------------------ Func _close() Exit EndFunc ;~ ------------------------------------------------------ While 1 $msg = GuiGetMsg() Select case $msg = $Button2 MsgBox(0, "", "Works") case $msg = $exititem or $msg = $GUI_EVENT_CLOSE Exit ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ case $msg = $Button1 AdlibEnable("_loop", 500) EndSelect WEnd Func _loop() ControlSend("Untitled", "", "Edit1", "test ") EndFunc ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------ ;~ ------------------------------------------------------
-
Help with, " 'Sending' a text file "!
chie replied to Glyph's topic in AutoIt General Help and Support
Maybe ?Case $msg = $GUI_EVENT_CLOSE[codebox] -
Help with, " 'Sending' a text file "!
chie replied to Glyph's topic in AutoIt General Help and Support
Forget my code there is mutch more simple way to do it I belive: #include <IE.au3> Case $msg = $okbutton $oIE = _IEcreate("http://www.google.com/",1,1) _IELoadWait($oIE) $sText = _IEBodyReadText ($oIE) MsgBox(0, "Body Text", $sText) oÝ÷ Ù«¢+Ø¥¹±Õ±Ðí%¹ÔÌÐì) ÍÀÌØíµÍôÀÌØí½ÕÑѽ¸)}%ÉÑ ÅÕ½ÐíÝÝܸ¸¹å½ÕÈÝÁ¹½´½¹Ý̹ÑáÐÅÕ½Ðì°À°À¤ì!¥¸)}%1½]¥Ð ÀÌØí½%¤(ÀÌØíÍQáÐô}% ½åIQáÐ ÀÌØí½%¤)5Í ½à À°ÅÕ½Ðí ½äQáÐÅÕ½Ðì°ÀÌØíÍQáФ)}%EեРÀÌØí½%¤ -
Help with, " 'Sending' a text file "!
chie replied to Glyph's topic in AutoIt General Help and Support
This? Maybe ...#include <GuiConstants.au3> GUICreate("GUI menu",400,400) $filemenu = GuiCtrlCreateMenu ("File") $exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu) $okbutton = GuiCtrlCreateButton ("Update",50,250,70,20) $cancelbutton = GuiCtrlCreateButton ("Exit",250,250,70,20) ;~ ======================= ======================= ======================= Global $iniread_userinputtext = IniRead("C:\__myfile.TXT", "neWS", "LABEL", "") Global $iniread_userinputtext2 = IniRead("C:\__myfile.TXT", "neWS", "TEXT", "") ;~ ======================= ======================= ======================= ;icon GuiSetIcon("clan news.exe", 0) ; PIC GuiCtrlCreatePic("img.jpg",0,0, 400,85) ; DATE GuiCtrlCreateDate("", 200, 85, 200, 20) ;news crap GUICtrlCreateLabel("Todays Headline", 75, 85, 85) $userinputtext = GUICtrlCreateInput($iniread_userinputtext, 120, 105, 280, 20) GUICtrlSetState ( -1, $GUI_FOCUS) GUICtrlCreateLabel("News", 75, 125, 30) $userinputtext2 = GUICtrlCreateEdit($iniread_userinputtext2,120, 155, 280, 75, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_MULTILINE + $ES_WANTRETURN) ;funtions GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton exit Case $msg = $exititem exit Case $msg = $okbutton IniWrite("C:\__myfile.TXT", "neWS", "LABEL", GUICtrlRead($userinputtext)) IniWrite("C:\__myfile.TXT", "neWS", "TEXT", GUICtrlRead($userinputtext2)) endselect WEnd -
I was experimenting with addlib...thing today & was unable to make it work...but let me explane this differently then. Run this code: press START button now press: Button2 or Fail->Exit (How can you make it to show the messagebox if you press button2 or Fail->Exit ? ) yes first you must press Start. Note! if you ckklick the tray meny show MsgBox after yo upressed start, the messagebox will be shown. #include <GuiConstants.au3> Opt("WinTitleMatchMode", 2) ; use any part of the window name Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("TrayOnEventMode",1) ;~ Gui Mainwindow ;~ --------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("sample", 270, 195) GUISetOnEvent($GUI_EVENT_MINIMIZE, "_minimize") GUISetOnEvent($GUI_EVENT_CLOSE, "_close") $Button1 = GUICtrlCreateButton("Start", 145, 55, 45, 23) ;start looping GUICtrlSetOnEvent(-1, "_OK") $Button2 = GUICtrlCreateButton("Button2", 195, 55, 45, 23) ;show messagebox GUICtrlSetOnEvent(-1, "_Button2") GUISetState(@SW_SHOW, $mainwindow) ;~ File Menu START ;~ --------------------------------------------------------------------------------------------------------- $filemenu = GUICtrlCreateMenu ("&File") $exititem = GUICtrlCreateMenuitem ("Exit",$filemenu) GUICtrlSetOnEvent(-1, "_Button2") ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- TrayCreateItem("Show MMesgbox") TrayItemSetOnEvent(-1, "_Button2") TrayCreateItem("Maximize") TrayItemSetOnEvent(-1, "_Maximize") TrayCreateItem("EXIT") TrayItemSetOnEvent(-1, "_close") TraySetState(@SW_HIDE) Func _OK() Run("Notepad.exe") While 1 Sleep(1000) ControlSend("Untitled", "", "Edit1", "test ") WEnd EndFunc Func _Button2() MsgBox(0, "", "Works") EndFunc Func _minimize() GUISetState(@SW_HIDE, $mainwindow) EndFunc Func _Maximize() GUISetState(@SW_SHOW, $mainwindow) GUISetState(@SW_RESTORE, $mainwindow) EndFunc Func _close() Exit EndFunc While 1 Sleep(20) WEnd
-
I understand this, yet while it is trapped we can call other function at the same time using TrayItemSetOnEvent & it works, this way you can maximize & minimize the GUI as you saw in the previous example. but if GUISetOnEvent is used for some reason nor minimizing(nor any other on event action that is performed on main GUI) is not working. & this is what im trying to do: call a function & let it loop something(lets say forever or until _ispressed....) & at the same time call another function & let it loop something else for example, so now we have 2 functons that are looping somethig & yet we can still call any other function to perform any other action(show other GUIs, save info etc...)So far I ve been making codes for 1 timeline(do only 1 thing at the time), Now I would like to create multiple timelines I hope this was more informative about what im trying to do.
-
It would be better if I wont post my code because its around over 1000 lines long, I was concidering rewriting it.... I still need to experiment more, maybe I know how to do it, an idea came to me & i will try it out tomorrow, bed time today But Can you tell me why cant I $GUI_EVENT_MINIMIZE the Mainwindow while the code is looping ? I forgot, How can I post my code so it wont take mutch space? (so the code will have scroll bar?) Sample: 1. Run the code 2. press Start Button (The code will start looping) 4. Now try minimize the GUI (The code must @SW_HIDE the Mainwindow). But this is not happening... #include <GuiConstants.au3> Opt("WinTitleMatchMode", 2) ; use any part of the window name Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("TrayOnEventMode",1) ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- $maximize = TrayCreateItem("Maximize") TrayItemSetOnEvent(-1, "_Maximize") $minimize = TrayCreateItem("Minimize") TrayItemSetOnEvent(-1, "_minimize") TraySetState(@SW_HIDE) ;~ Gui Mainwindow ;~ --------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("sample", 270, 195) GUISetOnEvent($GUI_EVENT_MINIMIZE, "_minimize") GUISetOnEvent($GUI_EVENT_CLOSE, "_close") $OK = GUICtrlCreateButton("Start", 145, 55, 45, 23) ;Button OK (left, top , width , height ) GUICtrlSetOnEvent(-1, "_OK") GUISetState(@SW_SHOW, $mainwindow) While 1 Sleep(10) WEnd Func _OK() Run("Notepad.exe") While 1 Sleep(1000) ControlSend("Untitled", "", "Edit1", "test ") WEnd EndFunc Func _minimize() GUISetState(@SW_HIDE, $mainwindow) EndFunc Func _Maximize() GUISetState(@SW_SHOW, $mainwindow) GUISetState(@SW_RESTORE, $mainwindow) EndFunc Func _close() Exit EndFunc
-
This is what i tried so far(& more but i post only this to save space) & no progress..Am I missing something?..#include <GuiConstants.au3> Opt("WinTitleMatchMode", 2) ; use any part of the window name Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown Opt("GUIOnEventMode", 1) ; Change to OnEvent mode ;~ Gui Mainwindow ;~ --------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("sample", 270, 195) $OK = GUICtrlCreateButton("Start", 145, 55, 45, 23) ;Button OK (left, top , width , height ) GUISetState(@SW_SHOW, $mainwindow) ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- $Trayexit = TrayCreateItem("Exit") TraySetState(@SW_HIDE) Run("Notepad.exe") GUICtrlSetOnEvent($Trayexit, "_Trayexit") GUICtrlSetOnEvent($OK, "_OK") While 1 Sleep(10) WEnd Func _OK() While 1 Sleep(1000) ControlSend("Untitled", "", "Edit1", "test ") WEnd EndFunc Func _Trayexit() Exit EndFuncoÝ÷ Ù«¢+ØÍÀÌØíµÍôÀÌØí=,(]¡¥±Ä(M±À ÄÀÀÀ¤( ½¹Ñɽ±M¹ ÅÕ½ÐíU¹Ñ¥Ñ±ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí¥ÐÄÅÕ½Ðì°ÅÕ½ÐíÑÍÐÅÕ½Ðì¤($$%¥ÀÌØíµÍÄôÀÌØíQÉåá¥ÐÑ¡¸á¥Ð(]¹
-
I dont know what should I search for(keywords I tried with ContinueCase & switch...but it was total miss...), but hire is the explanation: code is inside a loop(sending keys) is it possible to maximize it for example while its inside the loop? Sample code: #include <GuiConstants.au3> Opt("WinTitleMatchMode", 2) ; use any part of the window name Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown ;~ Gui Mainwindow ;~ --------------------------------------------------------------------------------------------------------- $mainwindow = GUICreate("sample", 270, 195) $OK = GUICtrlCreateButton("Start", 145, 55, 45, 23) ;Button OK (left, top , width , height ) GUISetState(@SW_SHOW, $mainwindow) ;~ Tray MENU ;~ --------------------------------------------------------------------------------------------------------- $Trayexit = TrayCreateItem("Exit") TraySetState(@SW_HIDE) Run("Notepad.exe") While 1 $msg = GUIGetMsg() $msg1 = TrayGetMsg() Select Case $msg1 = $Trayexit exit ;~ ------------------------------------------------------ case $msg = $OK GUISetState(@SW_HIDE,$mainwindow) While 1 Sleep(1000) ControlSend("Untitled", "", "Edit1", "test ") WEnd EndSelect WEnd
-
First I must thank all forum users for being so kind & helping out others. There are many similar sites where you can rate other people pictures, so hire is 1 small GUI that can rate those pictures in the background & read more: Was originally made for this site: http://www.rate.ee can be customised for other sites (but you need change the URL-s & form nr.-s) First I tried to make it more user friendly, where user can use GUI to set their own Hotkeys & URLs & Form Numbers, but I failed (therefore this GUI is not included hire. yes because of this you need to change the code to use it on other websites, but its not really much work, I tried to design the code as simple as I could) all extra info is saved to ini file. It can rate pictures in background it can check for updates can hide tray menu icon ( to continue rating in some internet coffee after your time is over(Hidden in background ) ) choose how to rate (Random or not random & if random then specify how many random marks.) can add a comment to a picture before rating it (optional) Has autoclikker GUI can also send raw keys or text ot mousecliks has simply log in function & log in & start rating function at program start-up To use the rater, the user must be logged in first.(unless auto-login option is used) Problems that may occur: IE crash due some IE add-on (Simply disable the add-on that is causing problem) Suggestion: Set IE to DO not show pictures.(then pictures wont even be downloaded & rating speed will be fast. I managed to rate more than around 10 000 pictures a day…once I tested it) Rate_me.au3
-
because you have many Bugs: Cant close it?: Case $msg2 = $GUI_EVENT_CLOSE Exit Hotkeyset("{esc}", "_Exit") Func _Exit() _IEQuit($oIE) Exit EndFunc oÝ÷ Ø&§¶¶y«¢+Ø ÍÀÌØíµÍôÀÌØíÍ¡½Ý¥Ñ´(í¹½Ð ÍÀÌØíµÍÈôÀÌØíÍ¡½Ý¥Ñ´(ì´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´)U%MÑMÑÑ¡M]}M!=¤(ÀÌØíá¥Ñ¥Ñ´ôQÉå ÉÑ%Ñ´ ÅÕ½Ðíá¥ÐÅÕ½Ðì¤(ÀÌØíÍ¡½Ý¥Ñ´ôQÉå ÉÑ%Ñ´ ÅÕ½ÐíM¡½ÜÅÕ½Ðì¤)QÉåMÑMÑÑ¡M]}!%¤(íM¡½ÜU$()}%9Ù¥Ñ ÀÌØí½%°ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÉѹ½Í¡½Ü¹Á¡ÀÅÕ½Ðì¤()Ý¡¥±Ä(ÀÌØíµÍÈôU%Ñ5Í ¤(ÀÌØíµÍôQÉåÑ5Í ¤(M±Ð(íø ÍÀÌØíµÍôÀ(íø ½¹Ñ¥¹Õ1½½À( ÍÀÌØíµÍôÀÌØíÍ¡½Ý¥Ñ´(]¥¹MÑMÑÑ ÅÕ½ÐíIÑÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°M]}M!=¤( ÍÀÌØíµÍÈôÀÌØíU%}Y9Q} 1=M½ÈÀÌØíµÍôÀÌØíá¥Ñ¥Ñ´(á¥Ð($(% ÍÀÌØíµÍÈôÀÌØí ÕÑѽ¹|Ø(%}ÍÑÉÑÑÉ¥¹ ¤)¹M±Ð)]¹()Õ¹}ÍÑÉÑÑÉ¥¹ ¤(íIÑ¥¹]¡¥±ÄѸ¸¸¡¥É)¹Õ¹But you may also want to take a look at this code: its basically same as yours only little bit better. take a look at attachment, since the code is 833 lines