|
-
Feb 13th, 2000, 02:44 AM
#1
Thread Starter
New Member
when I try this: X = Shell("aol.exe", 1)
It says file not found. Can someone help me ?
-
Feb 13th, 2000, 02:56 AM
#2
Hyperactive Member
Hi,
Try fully qualifying the pathname.
e.g.X = Shell("C:\America Online 4.0\aol.exe", 1)
Al.
------------------
A computer is a tool, not a toy.
<A HREF="mailto:[email protected]
[email protected]">[email protected]
[email protected]</A>
-
Feb 13th, 2000, 04:06 AM
#3
Thread Starter
New Member
It still dose the same thing: File not found.
-
Feb 13th, 2000, 04:11 AM
#4
Addicted Member
First findout where your aol.exe is by
running find program.
and then report back for the answer!
-
Feb 13th, 2000, 04:33 AM
#5
Thread Starter
New Member
-
Feb 13th, 2000, 04:53 AM
#6
Hyperactive Member
Hi,
I just started AOL with:
Code:
Sub Main()
x = Shell("c:\america online 4.0\aol.exe", 1)
End Sub
Al.
------------------
A computer is a tool, not a toy.
<A HREF="mailto:[email protected]
[email protected]">[email protected]
[email protected]</A>
-
Feb 13th, 2000, 04:57 AM
#7
Member
X = Shell("C:\America Online 5.0\aol.exe", 1)
-
Feb 13th, 2000, 06:47 AM
#8
Thread Starter
New Member
It still dose not work, Is there any way I can open Explore?
-
Feb 13th, 2000, 09:10 AM
#9
Hyperactive Member
you have to find the path of AOL on your computer and put that path and the name of the program in the quotation marks. It is different on a lot of computers, but if you just want to use it on yours, find the path of the program you want and put that in the quotation marks.
-
Feb 14th, 2000, 05:36 AM
#10
Thread Starter
New Member
How would I find the path?
-
Feb 14th, 2000, 06:00 AM
#11
Junior Member
Back to square one...
-
Feb 14th, 2000, 06:21 AM
#12
Thread Starter
New Member
Ok, I`m trying to make a program that starts aol and types in my password and signs me on How would I go about doing that?
-
Feb 14th, 2000, 05:43 PM
#13
Frenzied Member
Right-click on the AOL icon (on your desktop probably). Click on Properties.
Highlight the text in the "Target" box, right click and select COPY.
In VB;
X=Shell( [paste the text here] ,1)
Make sure the text has " either end.
This should work.
Once the program has been shelled by VB you can use the SendKeys function to send it the keystrokes necessary to log onto AOL.
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Feb 16th, 2000, 05:49 AM
#14
Thread Starter
New Member
-
Feb 16th, 2000, 06:31 AM
#15
AOL stores it's application path i the registry. So it is very easy to get that path from there.
Copy this code to your form:
Code:
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const ERROR_SUCCESS = 0&
Private Const KEY_QUERY_VALUE = &H1
Private Const KEY_NOTIFY = &H10
Private Const READ_CONTROL = &H20000
Private Const KEY_ENUMERATE_SUB_KEYS = &H8
Private Const STANDARD_RIGHTS_READ = (READ_CONTROL)
Private Const SYNCHRONIZE = &H100000
Private Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
Private Const REG_SZ = 1
Public Function GetAOLPath() As String
Dim lKeyHandle As Long
Dim lRet As Long
Dim strBuffer As String
Dim strKey As String
Dim strValue As String
strKey = "SOFTWARE\America Online\America Online\CurrentVersion"
strValue = "AppPath"
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, strKey, 0, KEY_READ, lKeyHandle)
If lRet = ERROR_SUCCESS Then
strBuffer = Space(255)
lRet = RegQueryValueEx(lKeyHandle, strValue, 0, REG_SZ, ByVal strBuffer, Len(strBuffer))
If lRet = ERROR_SUCCESS Then
GetAOLPath = Left(strBuffer, InStr(strBuffer, vbNullChar) - 1)
End If
RegCloseKey lKeyHandle
End If
End Function
Then, use this function like this:
Call Shell(GetAOLPath & "\aol.exe", vbNormalFocus)
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
-
Feb 16th, 2000, 06:58 AM
#16
Thread Starter
New Member
Sorry, but when I try to copy is says "not enougn room to paste into current line"
when I paste part of it dose not return after each line/
I think my computer hates me
-
Feb 16th, 2000, 07:09 AM
#17
Click on Edit post (a little icon with the pencil) on top of my post, the you can select the exact code from there.
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
-
Feb 16th, 2000, 07:30 AM
#18
Thread Starter
New Member
I hate to bug all of you but when I try to compile it says " error expected sub staic or function " and highlights the firse declare.
-
Feb 16th, 2000, 07:32 AM
#19
Copy the code I've posted to General declartion of the form.
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
-
Feb 17th, 2000, 07:41 AM
#20
Thread Starter
New Member
-
Feb 17th, 2000, 07:51 AM
#21
So Unbanned
You're pretty damn lazy.
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
-
Feb 17th, 2000, 07:59 AM
#22
Thread Starter
New Member
-
Feb 17th, 2000, 11:17 AM
#23
*ouch* sorry, but read some vb - books
-
Feb 17th, 2000, 11:24 AM
#24
So Unbanned
why don't you try:
Shell "C:\America Online 5.0\aol.exe <UserName> <Password>" ?
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|