Jump to content

Open a website with a $ variable


Recommended Posts

I have got a problem: I want to open a website For example: www.xxx.com/ , but i need a $yyy after the /(The $yyy is a value got form an input box). Is there a way to do that? So the final website shoul look like this: www.xxx.com/$yyy Hope you can help

Link to comment
Share on other sites

$Website = "www.xxx.com/" & $yyy

To include a string and a variable, you must use &. For example:

$Input = InputBox("Website", "Enter website after website.com/")

ShellExecute("http://www.website.com/" & $Input)
Edited by JasonB
Link to comment
Share on other sites

Thanks and one last question what isnt really connected to this thread: if i use ShellExecute how can i use * instead of characters after the part of the word? It simply gives me an error when i do that. Example:

ShellExecute(@ScriptDir & "\Data\Ins*.msi") So i want my program to run those msi-s in that folder what begin with Ins. Thanks for you help!

Link to comment
Share on other sites

This isnt good. For this I need the filename, and that's the most important, that i only want to write a part of the filename with * instead of the letters(like in windows search: if you dont know the whole filename you can type in a * insted of the missing part. Waiting for solution :)

Link to comment
Share on other sites

This isnt good. For this I need the filename, and that's the most important, that i only want to write a part of the filename with * instead of the letters(like in windows search: if you dont know the whole filename you can type in a * insted of the missing part. Waiting for solution :)

First of all, did you even look in the helpfile on FileFindFirstFile? It explicitly says that * and ? wildcards are supported.

Secondly, "Waiting for solution" makes it sound like you expect us to do it for you, sorry, but I doubt that's going to happen.

Show us that you made some effort first, then people might be willing to help you out with the problems you (might) have. :P

Edit: Strike that, I guess I was wrong.

Edited by FreeFry
Link to comment
Share on other sites

; Shows the filenames of all files in the current directory.
$search = FileFindFirstFile(@ScriptDir & "\Data\Ins\" & "*.msi")  

; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    ShellExecuteWait(@ScriptDir & "\Data\Ins\" & $file)
WEnd

; Close the search handle
FileClose($search)

Straight from manual, Should shellexecutewait all MSI in script directory. is this what you mean?

wtfpl-badge-1.png

Link to comment
Share on other sites

Gustorm

I just dont know in which situations should I use

Ok stabbing in the dark here, Are you asking ::

When/Where in Autoit3 can I use wildcards?

When/Where/How should I use the posted code in relation to what I am doing?

C'mon buddy bit more detail goes a long way! :)

wtfpl-badge-1.png

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...