Sign in to follow this  
Followers 0
ajit

Fileopen difficulty

6 posts in this topic

Hi

I have been trying to write a script to open a test.dot file as a new document (document1 - Microsoft Word) as it opens on double clicking the test.dot file.

I tried Fileopen without any success. Any help would be appreciated.

Thanking in anticipation

Ajit

Share this post


Link to post
Share on other sites



@ajit

Use ShellExecute (execute file with appropried application)

ShellExecute("file.dot")

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

@ajit

Use ShellExecute (execute file with appropried application)

ShellExecute("file.dot")
Thanks very much for your prompt reply

I tried ShellExecute but still the file would not open as Document1; It still opens as test.dot whereas i want it to open as Document1 without the name "test" as it would open on double clicking it.

Thanks again

Ajit

Share this post


Link to post
Share on other sites

@ajit

Haa...Ive just understand :)

Check for hotkeys and check for classlist of your word window

Here for new document its CTRL+N in example

ShellExecute("file.dot")
WinActivate("[CLASS:OpusApp]","")
WinWaitActive("[CLASS:OpusApp]","",3)
Send("^n")

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Actually, test.dot file opens as Document1 - Microsoft Word on double clicking it whereas when i use right click menu >> Open it opens as test.dot.

right click menu >> New opens it as Document1 - Microsoft Word, the way i want, but i dont know how to make a script for that.

Have i missed something??

Thanks again

Ajit

Share this post


Link to post
Share on other sites

Actually, test.dot file opens as Document1 - Microsoft Word on double clicking it whereas when i use right click menu >> Open it opens as test.dot.

right click menu >> New opens it as Document1 - Microsoft Word, the way i want, but i dont know how to make a script for that.

Have i missed something??

Thanks again

Ajit

Thanks very much for your replies.

Sending ^n opens a new document altogether (with no text as in original template) making it useless as a template.

Double clicking it opens the file as Document1 - Microsoft Word whereas opening from the context menu >> Open opens it as test.dot - Microsoft Word (not what i want), though there is also an option in context menu >> New, which is what i want.

Thanks again

Ajit

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