iceberg Posted August 24, 2006 Share Posted August 24, 2006 (edited) expandcollapse popupAutoItSetOption("WinDetectHiddenText", 1) ;FileDelete("c:\windows\temp\uim.txt") #include <GuiConstants.au3> #include <Constants.au3> #include "Misc.au3" #include <file.au3> If _Singleton("UIM", 1) = 0 Then Msgbox(16, "Warning", "An occurence of UIM is already running!") Exit EndIf $file = ("c:\windows\temp\uim.txt") Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) Opt("TrayIconHide", 0) TraySetOnEvent($TRAY_EVENT_PRIMARYUP, "SpecialEvent") TraySetState() GuiCreate("Underground IM 2.0", 281, 250,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor(0x003366) $Label_1 = GuiCtrlCreateLabel("Please enter your comments to send to the other party.", 10, 10, 270, 20) GUICtrlSetColor(-1,0xFFFF33) $Input_2 = GuiCtrlCreateInput("", 30, 130, 220, 35, $ES_MULTILINE) GUICtrlSetLimit(-1, 256) $Icon_3 = GUICtrlCreateButton("Icon3", 50, 180, 50, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 130) GUICtrlSetState($Icon_3, $GUI_DEFBUTTON) $Icon_4 = GuiCtrlCreateButton("Icon4", 175, 180, 50, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 131) $Label_1 = GUICtrlCreateLabel("empty", 30, 30, 220, 35, 0x1000) GUICtrlSetBkColor(-1, 0xb0e2ff) GUICtrlSetColor(-1, 0xff0000) $Left = GuiCtrlCreateButton("Left", 90, 80, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 146) GUICtrlSetBkColor(-1, 0xFFFF33) $Right = GuiCtrlCreateButton("Right", 140, 80, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 137) GuiSetState() While 1 If WinExists("Messenger Service") Then WinSetState("Messenger Service", "", @SW_HIDE) $text = WinGetText("Messenger Service", "") $var = StringMid($text, 78, 256) FileWriteLine($file, "David : " & $var & @CRLF) WinClose("Messenger Service", "") GUICtrlSetData($Label_1, "David: " & $var) GUISetState(@SW_Show) EndIf $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_EVENT_MINIMIZE GuiSetState(@SW_HIDE) Opt("TrayIconHide", 0) Case $msg = $Icon_4 ExitLoop Case $msg = $Icon_3 $network = Ping("testpc", 250) If $network Then $Output = GUICtrlRead($Input_2) GUICtrlSetData($Label_1, "Goliath: " & $Output) RunWait("c:\windows\system32\net send testpc " & $Output, "", @SW_HIDE) FileWriteLine($file, "Goliath : " & $Output & @CRLF) GUICtrlSetData($Input_2, "") GUICtrlSetState($Input_2, $GUI_FOCUS) GUICtrlSetState($Icon_3, $GUI_DEFBUTTON) Else Msgbox(16, "Status", "An error occured with number: " & @error) EndIf Case $msg = $Right $var3 = ($var) + 1 GUICtrlSetData($Label_1, "David: " & $var3) Case $msg = $Left $var3 = ($var) - 1 GUICtrlSetData($Label_1, "David: " & $var3) EndSelect WEnd Func SpecialEvent() GuiSetState(@SW_Show) Opt("TrayIconHide", 1) EndFunc Exit Can somepls pls help me with lines 77 to 82? I am stuck here. Pressing the right arrow button should scroll down the text file by one line and display it. Pressing the left arrow button should scroll up the text file by one line and display it as well. Thank you. Edited August 24, 2006 by iceberg mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
tAKTelapis Posted August 24, 2006 Share Posted August 24, 2006 (edited) well, $var is not specified anywhere to begin with.. try adding the following line before you enter the select statement: $var = "" then $var will have something to work with in the first place.. as for a text file, you seem to have been rather resourceful so far. if you dont have an answer when i get back to work tomorrow, i might have a looksee. Edited August 24, 2006 by tAKTelapis Link to comment Share on other sites More sharing options...
themax90 Posted August 24, 2006 Share Posted August 24, 2006 For more Native AutoIt TCP, check my signature. Link to comment Share on other sites More sharing options...
iceberg Posted August 24, 2006 Author Share Posted August 24, 2006 okie, i m still stuck. someone pls help me. thank you. mouse not found....scroll any mouse to continue. 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