|
| Author |
Message |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 5:14 pm Post subject: |
|
|
Private Sub Form_Load() MSN_STATUS = MY_STATUS = AWAY End Sub That command is supposed to changed my msn status to away ? right ?
and i dont no why it is not changing i have gone to references and put API Type libary on.
if anyone knows why it is not changing my status please reply for me !
Thanks Lee ! |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Feb 08, 2005 5:37 pm Post subject: |
|
|
I would guess that its not working because it is not actualy VisualBasic code. I would think you need to use a function to change your status not just change a variables value.
BTW your topic name is annoying and doesn't make me want to help you at all. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 5:41 pm Post subject: |
|
|
Ok mate sorry about the topic name.
Mate is there anything wrong in the code. like the top part example : -
Private Sub Form_Load()
Because if i remeber last tiem it was different.. |
|
| Back to top |
|
 |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 5:53 pm Post subject: |
|
|
| Code: | | Private Sub Form_Load()<br />MSN_STATUS = MY_STATUS = AWAY<br />End Sub<br /> |
That command is supposed to changed my msn status to away ? right ?
and i dont no why it is not changing i have gone to references and put API Type libary on.
if anyone knows why it is not changing my status please reply for me !
Help appriciated everyone plz ! |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Tue Feb 08, 2005 6:31 pm Post subject: |
|
|
Of cource, Msn has to be down again, but this should work.
| Code: | | 'First click on Project>References, and add the reference "Messenger API Type Library"<br /><br />Option Explicit<br />Private WithEvents msn As MessengerAPI.Messenger<br /><br />Private Sub Form_Load()<br /> Set msn = New MessengerAPI.Messenger<br /><br /> msn.MyStatus = MISTATUS_AWAY<br />End Sub |
Edit: Added a more descriptive title. In the future don't use titles like "PLS HELP ME". |
|
| Back to top |
|
 |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 6:40 pm Post subject: |
|
|
cheers mate ill try that ! whats*lazy*email so i can ad you on msn mine is X_MX3R_X@hotmail.com |
|
| Back to top |
|
 |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 6:51 pm Post subject: |
|
|
Sorry and 1 more thing*lazy*no : -
| Code: | | Private WithEvents msn As MessengerAPI.Messenger<br /><br />Private Sub Form_Load()<br /> Set msn = New MessengerAPI.Messenger<br /><br /> msn.MyStatus = MISTATUS_AWAY<br />End Sub<br />Private Sub Form_Load()<br /> Set msn = New MessengerAPI.Messenger<br /><br /> msn.MyStatus = MISTATUS_BUSY<br />End Sub |
How come it done work is it because, the | Code: | | Private Sub Form_Load() |
Have to have like a number saying that it is command 2 or 3. or so on.
if it is right please show me how i would do it.. |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Tue Feb 08, 2005 7:00 pm Post subject: |
|
|
erm.. ok..
| Code: | | 'Set this ONCE in your whole program<br />Private WithEvents msn As MessengerAPI.Messenger<br /><br />'Use this sub ONCE in your whole program<br />Private Sub Form_Load()<br /> <br />'Set this ONCE in your whole program, in the Form_Load sub<br />Set msn = New MessengerAPI.Messenger<br /><br /> <br />'Use this to change your status<br />msn.MyStatus = MISTATUS_AWAY<br /><br />'If you want to do another status, change the MISTATUS_AWAY part to something else, don't add all the other parts of the code each time<br />End Sub |
|
|
| Back to top |
|
 |
leekx1 Newbie

Joined: 28 Feb 2004 Posts: 16
   
|
Posted: Tue Feb 08, 2005 7:33 pm Post subject: |
|
|
| Code: | | Private WithEvents msn As MessengerAPI.Messenger<br /><br />Private Sub Form_Load()<br />MSN_MYSTATUS = MISTATUS = away<br />MSN_MYSTATUS = MISTATUS = BUSY<br />MSN_MYSTATUS = MISTATUS = OUT_TO_LUNCH<br />End Sub |
So i would do it like that. but if so how would i get the command buttons and how would the command no what one to operate. ? |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Wed Feb 09, 2005 2:06 pm Post subject: |
|
|
The use of periods and underscores is important. You can't just change all periods and underscores in Keenies code to = in yours. You also ignored pretty much all of his message. If you expect to get help then you have to do some of the work. Learning VB is the first thing you should do. Learn it doing something other than bots. VB is made to be visual and easy to design forms and add stuff to those forms. If you don't know how to add buttons then I would recommend going to your local library or bookstore and find a cheap learning VB book or just hitting google and looking for a VB tutorial. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Fri Feb 11, 2005 3:44 am Post subject: |
|
|
If you are just going to ignore what I'm saying, then you are on your own. I'm not going to write it all for you. If you can't copy and paste what I put into a form and see how it works, then you should just delete VB from your computer.
edit: I changed my mind, but I wrote it how I wanted it, not how you wanted it. Learn it yourself and you can have it how you want it.
Add a combo box and name it 'status'
| Code: | | 'Set this ONCE in your whole program<br />Private WithEvents msn As MessengerAPI.Messenger<br /><br />'Use this sub ONCE in your whole program<br />Private Sub Form_Load()<br /> <br /> 'Set this ONCE in your whole program, in the Form_Load sub<br /> Set msn = New MessengerAPI.Messenger<br /><br /> 'Set the text of the combo box<br /> status.Text = "Change Status"<br /><br /> 'Add the statuses<br /> status.AddItem ("Online")<br /> status.AddItem ("Busy")<br /> status.AddItem ("Be Right Back")<br /> status.AddItem ("Away")<br /> status.AddItem ("On The Phone")<br /> status.AddItem ("Out To Lunch")<br /> status.AddItem ("Appear Offline")<br />End Sub<br /><br /><br />Private Sub status_click()<br /> 'Change the status depending on what is clicked on<br /> Select Case status.Text<br /> Case "Online"<br /> msn.MyStatus = MISTATUS_ONLINE<br /> Case "Busy"<br /> msn.MyStatus = MISTATUS_BUSY<br /> Case "Be right back"<br /> msn.MyStatus = MISTATUS_BE_RIGHT_BACK<br /> Case "Away"<br /> msn.MyStatus = MISTATUS_AWAY<br /> Case "On The Phone"<br /> msn.MyStatus = MISTATUS_ON_THE_PHONE<br /> Case "Out To Lunch"<br /> msn.MyStatus = MISTATUS_OUT_TO_LUNCH<br /> Case "Appear Offline"<br /> msn.MyStatus = MISTATUS_INVISIBLE<br /> End Select<br />End Sub |
|
|
| Back to top |
|
 |
|