Gustorm Posted July 1, 2008 Share Posted July 1, 2008 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 More sharing options...
TehWhale Posted July 1, 2008 Share Posted July 1, 2008 (edited) $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 July 1, 2008 by JasonB Link to comment Share on other sites More sharing options...
Gustorm Posted July 1, 2008 Author Share Posted July 1, 2008 (edited) And if i have got that variable in the middle of the address? Like www.x$yyyxx.com Edited July 1, 2008 by Gustorm Link to comment Share on other sites More sharing options...
herewasplato Posted July 1, 2008 Share Posted July 1, 2008 (edited) ShellExecute("www.x" & $yyy & "xx.com") Edited July 1, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Gustorm Posted July 1, 2008 Author Share Posted July 1, 2008 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 More sharing options...
herewasplato Posted July 1, 2008 Share Posted July 1, 2008 how can i use * instead of charactersUse FileFindFirstFile first.I've never used it, but a search of the help file for "wildcard" returned only 3 entries to scan... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Gustorm Posted July 1, 2008 Author Share Posted July 1, 2008 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 More sharing options...
FreeFry Posted July 2, 2008 Share Posted July 2, 2008 (edited) 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. Edit: Strike that, I guess I was wrong. Edited July 2, 2008 by FreeFry Link to comment Share on other sites More sharing options...
Mobius Posted July 2, 2008 Share Posted July 2, 2008 ; 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? Link to comment Share on other sites More sharing options...
Gustorm Posted July 2, 2008 Author Share Posted July 2, 2008 Yes it is thank you. I just dont know in which situations should I use &. Freefry: I wrote wating for solution becouse it was boring that I always wrtite Thanks for your help Link to comment Share on other sites More sharing options...
Mobius Posted July 2, 2008 Share Posted July 2, 2008 GustormI just dont know in which situations should I useOk 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! Link to comment Share on other sites More sharing options...
Gustorm Posted July 2, 2008 Author Share Posted July 2, 2008 It was about wildcards... and the & sign. But now I think I understood it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now