How open Folders and other do other things but didn't know how to
Mike Matthews
omnis at lineal.co.uk
Tue Jul 16 07:37:02 EDT 2013
Have an early lunch, job well done! I got the OSX window opening working from Keith, very nice man, an doing to EurOmnis 2013. Now this bit as well.
Just the Properties Win Window to do.
Mike
Mike Matthews,
Managing Director, SQLWorks Software Ltd
Tel: +44 (0)1271 850 550
Email: mike.matthews at sqlworks.co.uk
Web: www.sqlworks.co.uk
SQLWorks replaces Sage, ACT!, Opera, Access, SAP
On 16 Jul 2013, at 12:06, Kelly Burgess <kellyb at montana.com> wrote:
> Hi Mike,
>
>> open a folder window in both OSX and Windows?
>
> To open a window and select a file in it, put the path to the file in datapath and:
>
> If tIsMacX
> Begin text block
> Text: Tell application "Finder" (Carriage return)
> Text: reveal file("[datapath]") (Carriage return)
> Text: activate (Carriage return)
> Text: End tell (Carriage return)
> End text block
> Get text block script
> Do $runapplescript(script,result) Returns err
> ;
> Else If tIsWin32
> If isunicode()
> Register DLL ('User32.dll','FindWindowW','JJC')
> Call DLL ('User32.dll','FindWindowW','#NULL#','MyAppWindowTitle') Returns hwnd
> Register DLL ('Shell32.dll','ShellExecuteW','JJCCCCJ') Returns err
> Call DLL ('Shell32.dll','ShellExecuteW',hwnd,'open','explorer.exe',con('/select, "',datapath,'"'),'',1) Returns err
> Else
> Register DLL ('User32.dll','FindWindowA','JJC')
> Call DLL ('User32.dll','FindWindowA','#NULL#','MyAppWindowTitle') Returns hwnd
> Register DLL ('Shell32.dll','ShellExecuteA','JJCCCCJ') Returns err
> Call DLL ('Shell32.dll','ShellExecuteA',hwnd,'open','explorer.exe',con('/select, "',datapath,'"'),'',1) Returns err
> End If
> End If
>
>
>> Anyone know about the Properties / GetInfo windows?
>
> Found this Applescript, untested -
>
> set macpath to POSIX file "/Users/rross/test.applescript" as alias
> tell application "Finder" to open information window of macpath
>
> For Windows, the above would do everything up to the point where you'd want to invoke the File menu's Properties command. I don't know how to tell a window to perform a menu command.
>
> Kelly
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list