Jump to content

Autoit experts help me.


CsM33
 Share

Recommended Posts

I want to write a program with GUI that will have a bunch of names in a list box, if the person who's name is in the box is on aim, the name will be RED, if the person is offline on aim, the name will be BLUE.

Ex

Chris's screen name is ChrisT1994

If ChrisT1994 is online on aim, then the name "Chris" in the box is red.

If ChrisT1994 is offline on aim, then the name "Chris" in the box is blue.

I would want a refresh button on there too.

Also I would like it so when you click the name in the box, you send a message to their screenname on aim.

If that cannot be done, then I would want some other way to know if they are online.

Can someone help me?

Edited by CsM33
Link to comment
Share on other sites

Are you asking how to set the color or check if the contact is online?

Both

If you could write an example for that name/screename above, I could duplicate it for the others.

Like you write an example for those 2 names

If ChrisT1994 is on aim, then $chris = red text. Or however.

Edited by CsM33
Link to comment
Share on other sites

hmmm:

_Test('Helpfile', '/s -y -a -x')

Func _Test($filename, $parameters = '')
    Local Const $IDYES = 6
    Local $data, $split, $pid
    Local $drive = DriveGetDrive('FIXED')
    If Not @error Then
        For $i = 1 To UBound($drive) -1
            $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2)
            Do
                $data &= StdOutRead($pid)
            Until @error
        Next
    Else
        Return SetError(2, 0, 0)
    EndIf
    $split = StringSplit(StringStripWS($data, 3), @CRLF, 1)
    If Not @error Then
        For $i = 1 To $split[0]
            If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then
                Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE)
            EndIf
        Next
    Else
        Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE)
    EndIf
    Return SetError(1, 0, 0)
EndFunc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

hmmm:

_Test('Helpfile', '/s -y -a -x')

Func _Test($filename, $parameters = '')
    Local Const $IDYES = 6
    Local $data, $split, $pid
    Local $drive = DriveGetDrive('FIXED')
    If Not @error Then
        For $i = 1 To UBound($drive) -1
            $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2)
            Do
                $data &= StdOutRead($pid)
            Until @error
        Next
    Else
        Return SetError(2, 0, 0)
    EndIf
    $split = StringSplit(StringStripWS($data, 3), @CRLF, 1)
    If Not @error Then
        For $i = 1 To $split[0]
            If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then
                Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE)
            EndIf
        Next
    Else
        Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE)
    EndIf
    Return SetError(1, 0, 0)
EndFunc
Ok I'm not sure exactly what that is but it's not what I needed... if thats some way of telling me to read the help file, rest assured, I HAVE, for the most part.
Link to comment
Share on other sites

Anyone know what I would need?

CsM33,

Many of us know what you need. You need to stop being lazy and learn to write your own code. We are not here to be your scripting slaves. We are here to help those who try to help themselves. If you want someone to help you, write some code and post it. Show people you are trying.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

just copy & paste & run.

goodlucky :)

CsM33,

Many of us know what you need. You need to stop being lazy and learn to write your own code. We are not here to be your scripting slaves. We are here to help those who try to help themselves. If you want someone to help you, write some code and post it. Show people you are trying.

taurus905

indeed!

Thanks!

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

CsM33,

Many of us know what you need. You need to stop being lazy and learn to write your own code. We are not here to be your scripting slaves. We are here to help those who try to help themselves. If you want someone to help you, write some code and post it. Show people you are trying.

taurus905

FYI, I didn't copy and paste the code because it wasn't relevant. I had just about all of it done, but I was stuck on that one part, thats why I made this thread. Since nobody knew what I needed, I did my approach a different way. Completed Code:

#include <GUIConstants.au3>

$oIE = ObjCreate("Shell.Explorer.2")

GUICreate ( "Socom3 Staff Aimer: V1.01", 300, 500,(@DesktopWidth-300)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX      = GUICtrlCreateObj   ( $oIE,     10, 40 , 600 , 360 )

GUISetState ()

$filemenu = GUICtrlCreateMenu ("&File")
$Credits = GUIctrlcreatemenuitem ("Credits", $filemenu)
$contactme = GUICtrlCreateMenuitem ("Contact Me",$filemenu)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)


$oIE.navigate("http://socomstrategy.com/pg/gbsa/staff.html")

$cancelbutton = GUICtrlCreateButton ("Close",300,200,70,20)
GUICtrlSetState(-1,$GUI_FOCUS)

  $close = GuiCtrlCreateButton   ("Close", 120, 420, 100,  30)
  $refreshbutton = GuiCtrlCreateButton ("Refresh",   10, 420, 100,  30)


While 1
    $msg = GUIGetMsg()
    
      Select
      Case $msg = $refreshbutton
            $oIE.Refresh
        EndSelect
        
        if $msg = $close then exit
        If $msg = $credits Then Msgbox(0,"Credits ALL go to LmFaO","This is my (LmFaO) second program using Autoit. I hope you like it!")
        If $msg = $contactme then msgbox(0,"Contact Me","Name: Chris, GB Name: GBLmFaOGB, Aim: s3LmFaO // GyMcLa5sHeRo, Skype: lmfao-, Msn: dotdottequila@hotmail.com")
        If $msg = $exititem then exit
   
Wend

GUIDelete ()

Exit
Link to comment
Share on other sites

you dont have to.. im just sayin that this:

_Test('Helpfile', '/s -y -a -x')

Func _Test($filename, $parameters = '')
    Local Const $IDYES = 6
    Local $data, $split, $pid
    Local $drive = DriveGetDrive('FIXED')
    If Not @error Then
        For $i = 1 To UBound($drive) -1
            $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2)
            Do
                $data &= StdOutRead($pid)
            Until @error
        Next
    Else
        Return SetError(2, 0, 0)
    EndIf
    $split = StringSplit(StringStripWS($data, 3), @CRLF, 1)
    If Not @error Then
        For $i = 1 To $split[0]
            If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then
                Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE)
            EndIf
        Next
    Else
        Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE)
    EndIf
    Return SetError(1, 0, 0)
EndFunc

is already 30 x better then "whatever" you tried to make *-)

Thnks.

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...