rich2323 Posted November 16, 2018 Share Posted November 16, 2018 I am trying to launch the files properties of a file in a script. I have tried this but it give me an error. ShellExecute ("C:\Troyit\testpdf.pdf","","","properties" ) Any suggestions? Thanks, Rich Link to comment Share on other sites More sharing options...
rich2323 Posted November 16, 2018 Author Share Posted November 16, 2018 So I was able to get to my goal, but was hoping to find something that did not rely on using Send command. Local $filepath = "c:\troyit\testpdf.pdf" Local $iPid = Run("explorer.exe /n,/e,/select," & $filepath) ProcessWait($iPid) Send('!{Enter}') Link to comment Share on other sites More sharing options...
BrewManNH Posted November 16, 2018 Share Posted November 16, 2018 What are you trying to achieve, other than launching the properties of the file? In other words, what is your end goal to be when the properties window opens? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
rich2323 Posted November 16, 2018 Author Share Posted November 16, 2018 Change the .pdf extension to open with Adobe Acrobat Standard set as the default. Rich Link to comment Share on other sites More sharing options...
orbs Posted November 16, 2018 Share Posted November 16, 2018 what you are trying to do is called "changing file association", and instead of simulating that setting via the file properties dialog, look into registry settings or command-line utilities to do that. google "change file association command line" or "change file association registry". also, regarding your original intent, had you bothered to search before asking, you'd have found several topics, such as this: rich2323 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
rich2323 Posted November 16, 2018 Author Share Posted November 16, 2018 Thank you for finding the solution, it works perfect for my needs. Rich 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