Sign in to follow this  
Followers 0
=sinister=

Web site

27 posts in this topic

#1 ·  Posted (edited)

Is there a command that It will take the user to a web site?

Edited by =sinister=

Share this post


Link to post
Share on other sites



Is there a command that It will take the user to a web site? Just wondering!  ;)

<{POST_SNAPBACK}>

what kind of command are you looking for, a browser?

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

ya, somethin like that.

Share this post


Link to post
Share on other sites

you can also do this:

Run("c:\Program Files\Mozilla Firefox\firefox.exe http://www.google.com")

and i'm sure you can do that with IE as well.

and if you do this method you can send "&" symbols..

Share this post


Link to post
Share on other sites

very true w0uter.

I think most people would have IE at least. but you could always check the registry to see what is the default browser, and path to it i think.

Share this post


Link to post
Share on other sites

If you're using the Beta version of Autoit (it has COM support) you can use the following:

_OpenWeb("http://www.autoitscript.com")

Func _OpenWeb($URL)
    $oWeb = ObjCreate("Shell.Application")
    $oWeb.Open($URL)
EndFunc

We have enough youth. How about a fountain of SMART?

Share this post


Link to post
Share on other sites

nah, none of these work.... and no I don't have firefox or whatever it is.

Share this post


Link to post
Share on other sites

How 'bout this one ... just found it

run("rundll32 url.dll,FileProtocolHandler http://www.autoitscript.com")

We have enough youth. How about a fountain of SMART?

Share this post


Link to post
Share on other sites

yay, it works, but can I get it so it a new window pops up?

Share this post


Link to post
Share on other sites

Use beta its more stable anyway

$url= "http://www.hotmail.com/";set url here
$o_object = ObjCreate("InternetExplorer.Application")
$o_object.visible = 1
$o_object.navigate ($url)

Share this post


Link to post
Share on other sites

Use beta its more stable anyway

<{POST_SNAPBACK}>

Now there's a cognitive dissonance :P;) !

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

yay, it works, but can I get it so it a new window pops up?

<{POST_SNAPBACK}>

check out dale's IE.au3. it's awesome for IE automation and it's very well documented to figure out how to implement it. there are also numerous posts about it, or where it was the solution to an internet automation issue.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

I agree with using the Default Browser. Although IE is installed by default normally, there are some people who actually remove it, and some people who just don't install it (on older OSes), so if you try to use anything that attempts to use IE or it's objects, you'll get an error.

As for opening it in a new window, I'm pretty sure it's a user's setting. You just might need to either use IE and let the user suffer if they don't have it installed, or use a standalone Web Browser. I don't know if there's something smaller to keep your script portable, but you could always use Firefox.exe in your script without needing to install it to the user's computer.

Edit: Just found a nice small one. well, a small one at least, don't know how nice it is, but it's a pop pick at download.com so it can't be half-bad. Xana web browser might help you out. Again, no installation necessary, and instead of the 6MB Firefox is, it's not even 400KB

Edited by falconv

Share this post


Link to post
Share on other sites

I agree with using the Default Browser.  Although IE is installed by default normally, there are some people who actually remove it, and some people who just don't install it (on older OSes), so if you try to use anything that attempts to use IE or it's objects, you'll get an error.

As for opening it in a new window, I'm pretty sure it's a user's setting.  You just might need to either use IE and let the user suffer if they don't have it installed, or use a standalone Web Browser.  I don't know if there's something smaller to keep your script portable, but you could always use Firefox.exe in your script without needing to install it to the user's computer.

Edit: Just found a nice small one.  well, a small one at least, don't know how nice it is, but it's a pop pick at download.com so it can't be half-bad. Xana web browser might help you out.  Again, no installation necessary, and instead of the 6MB Firefox is, it's not even 400KB

<{POST_SNAPBACK}>

400 kb ofcourse with proper flash plugin and javascript support gues not

U used IE because thats standard on windows and who said his program was for all people on the world my he just wants to use it by himself

I have firefox too nice but some things just don't work

Thats good for some website wich have anoying things wich I donot want to work.

Sites should work on several browsers and work fully but thats not the case.

If this also works with default browser thats ok.

One other thing I said beta is more stable because I had the "stable" version crashing on me several times with basic scripts and beta crashed much less times.

More functions less bugs so thats why I said that.

Share this post


Link to post
Share on other sites

This is what I do when I need IE to open a webpage using a script. You can do this from a run line, a shortcut on the desktop, or whatever.

To open for example www.yahoo.com in a new window, you do the following:

C:\Program Files\Internet Explorer\iexplore.exe -new http://www.yahoo.com

This will open it in a new browser window.

I first used this trick building a toolbox to service PCs. (needing to open a antivirus website to update stinger. works great.

hope this helps.

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

lets make everybody happy... 8)

Call("Set_Browser")


Func Set_Browser()
    
Local $Launch = "", $iMsgBoxAnswer, $website = "www.xpcleanmenu.hostrocket.com"

if FileExists(@ProgramFilesDir & "\firefox\firefox.exe") then $Launch = 1
if FileExists(@ProgramFilesDir & "\Internet Explorer\iexplore.exe") then $Launch = $launch + 2
    
If $launch = 3 Then
    $iMsgBoxAnswer = MsgBox(35, "Please Choose a Web-browser", "Press *Yes*   to use Windows Internet Explorer" & @CRLF & "(Hint - This is the default Web-browser) " & @CRLF & "" & @CRLF & "Press *No*       to use the FireFox Web-browser" & @CRLF & "" & @CRLF & "Press *Cancel*   to return to the Menu ", 22)
EndIf

If $iMsgBoxAnswer = 2  Then Return
If $launch = 2 or $iMsgBoxAnswer = 6 Then
    $PID = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe -new " & $website)
               ; write chioce to ini  ???
    Return
EndIf
If $launch = 1 or $iMsgBoxAnswer = 7 Then
    $PID = Run(@ProgramFilesDir & "\FireFox\FireFox.exe " & $website)
; write chioce to ini  ???
    Return
EndIf

EndFunc

8)

ps

i don't have firefox ( not a full test) 8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

(Hint - This is the default Web-browser)

firefox is my default web-browser ;)

and what if they use mozilla, or netscape, or some other weird browser.

hows this

Func _INetBrowse($s_URL, $i_OPT = 2)
    Switch $i_OPT
        Case 0
        ;drawback: doesnt work on urls with "&"
            RunWait(@comspec & ' /c start ' & $s_URL, @WorkingDir, @SW_HIDE)
            return 1
        Case 1
        ;thx to sykes <---------------------------------------------
            RunWait("rundll32.exe url.dll,FileProtocolHandler " & $s_URL, @WorkingDir)
            Return 1
        Case 2
        ;prefered 1
            DllCall("Shell32.dll", "int", "ShellExecute", "hwnd", 0, "str", 'open', "str", $s_URL, "str", '', "str", @WorkingDir, "int", 10)
            return 1
        Case 3
        ;prefered 2
            $o_SA = ObjCreate('Shell.Application')
            $o_SA.Open($s_URL)
            return 1
    EndSwitch
    Return 0
EndFunc  ;==>_INetBrowse
Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
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
Sign in to follow this  
Followers 0