locutus243 Posted September 21, 2004 Share Posted September 21, 2004 I have a folder on my D: drive which contains pictures. I want AutoIT to open a specified picture when I request it, pretty much like a FileOpen command, but FileOpen only opens text files. Is there another function that allows me to open pictures ??? Also is it possible to write a script that creates a input box and then allows you to input the picture I want to open. (In essence opening a input box and then using whatever is entered in there to determine what my script does!!) Thanx for any help you can give Mark Link to comment Share on other sites More sharing options...
Beastmaster Posted September 21, 2004 Share Posted September 21, 2004 like a FileOpen command, but FileOpen only opens text fileswhen I request itAka you wanna have a dialog with your script ?!That sample is from AU3's help$message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, "C:\Windows\", "Images (*.jpg;*.bmp)", 1 + 4 ) If @error Then MsgBox(4096,"","No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) MsgBox(4096,"","You chose " & $var) EndIf Link to comment Share on other sites More sharing options...
Marc Posted September 21, 2004 Share Posted September 21, 2004 AutoIt does not open Images by itself. You can, however, open it with your favorite image viewer, launched by AutoIt. for example: $picture = Inputbox ("Enter Picture", "Which picture shall be opened?","test.jpg") Run(@ProgramFilesDir & "\irfanview\i_view32.exe " & $picture For the ease of use, I'd recommend using a "real" FileOpen Dialogue, let's say $picture = FileOpenDialog ("Which picture shall be opened?","", "*.jpg") Hope it helps... Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
emmanuel Posted September 21, 2004 Share Posted September 21, 2004 AutoIt does not open Images by itself. You can, however, open it with your favorite image viewer, launched by AutoIt. for example: $picture = Inputbox ("Enter Picture", "Which picture shall be opened?","test.jpg") Run(@ProgramFilesDir & "\irfanview\i_view32.exe " & $picture For the ease of use, I'd recommend using a "real" FileOpen Dialogue, let's say $picture = FileOpenDialog ("Which picture shall be opened?","", "*.jpg") Hope it helps... Marc <{POST_SNAPBACK}>well, you could have your script use SplashImageOn to display the picture, I think that Larry had posted some methods of getting a JPEG's dimensions which you could use to set the splash window's size... SplashImageOn("TitleFoo", $picture) "I'm not even supposed to be here today!" -Dante (Hicks) 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