handy applescript

Mike Matthews - Omnis omnis at lineal.co.uk
Tue Aug 15 09:47:09 UTC 2023


Dare I tread this treacherous path? :)

Mike Matthews

Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>

omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>

www.lineal.co.uk<http://www.lineal.co.uk/>

www.sqlworks.co.uk<http://www.sqlworks.co/>



On 15 Aug 2023, at 10:34, Phil (OmnisList) <phil at pgpotter.co.uk<mailto:phil at pgpotter.co.uk>> wrote:

Caution: This is a message which has originated from outside the organisation. Ensure the sender is trusted and the content is safe before opening links or attachments.



Hehe, and into the dark side we go....

Since the Mac version was useful, I created a Windows batch file based
upon Kellys work...

https://github.com/potterpg/Omnis-Version-Batch/blob/main/OmnisVersion.bat

Works for me...

regards
Phil Potter
Based in Chester in the UK.

On 15/08/2023 00:36, TBS wrote:
…..the dark side ;)

Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582

On Aug 14, 2023 at 7:25 PM -0400, Paul Mulroney<pmulroney at logicaldevelopments.com.au<mailto:pmulroney at logicaldevelopments.com.au>>, wrote:
Hi Kelly,

Thank you for your generosity in utility! Now, if only there was a Windows way to do the same thing ...

Regards,
Paul

On 14 Aug 2023, at 5:18 pm, Phil (OmnisList)<phil at pgpotter.co.uk<mailto:phil at pgpotter.co.uk>>  wrote:

Hey Kelly,

You first released this some time ago, and I religiously update it with the later codes...

a useful little 'droplet' tool, so thanks.

regards
Phil Potter
Based in Chester in the UK.

On 13/08/2023 12:00, Kelly Burgess wrote:
I just revised a 'droplet' tool I have, adding Studio 11 awareness. This is a compiled Applescript app whose icon you can drag and drop an Omnis library onto, and it will tell you which version of Studio it was last used with. Saves you from launching a library with the wrong version, having to decline the offer to convert or deal with the 'can't read library' error when there's a version mismatch.

If you don't use Macs, it also serves as a list of the first-byte values you can hex-edit to back-convert a library in some cases.

Paste this script into Apple's Script Editor and save it as a run-only Application that doesn't stay open.

Kelly



on open files_
repeat with file_ in files_
set file_ to POSIX path of file_
-- read the first three bytes
set foo to (open for access (POSIX file file_))
set txt to (read foo for 3)
close access foo
-- map bytes to version
set byteOne to ASCII number (first character of txt)
set byteTwo to ASCII number (second character of txt)
set byteThree to ASCII number (third character of txt)
set dialogMsg to file_ & " is not a Studio 3 or Studio 4 library."
if byteTwo = 1 then -- 0x01
if byteOne = 44 then -- 0x2C
set dialogMsg to file_ & " is a Studio 3.x library."
end if
if byteOne = 45 then -- 0x2D
set dialogMsg to file_ & " is a Studio 4.x library."
end if
if byteOne = 46 then -- 0x2E
set dialogMsg to file_ & " is a Studio 4.3.1+ library."
end if
if byteOne = 47 then -- 0x2F
set dialogMsg to file_ & " is a Studio 5.0.x library."
end if
if byteOne = 48 then -- 0x30
set dialogMsg to file_ & " is a Studio 5.1.x library."
end if
if byteOne = 49 then -- 0x31
set dialogMsg to file_ & " is a Studio 5.2.x library."
end if
if byteOne = 50 then -- 0x32
set dialogMsg to file_ & " is a Studio 6.0.x library."
end if
if byteOne = 51 then -- 0x33
set dialogMsg to file_ & " is a Studio 6.1.x library."
end if
if byteOne = 52 then -- 0x34
set dialogMsg to file_ & " is a Studio 8.0.x library."
end if
if byteOne = 53 then -- 0x35
set dialogMsg to file_ & " is a Studio 8.1.x library."
end if
if byteOne = 54 then -- 0x36
set dialogMsg to file_ & " is a Studio 10.0.x library."
end if
if byteOne = 55 then -- 0x37
set dialogMsg to file_ & " is a Studio 10.1.x library."
end if
if byteOne = 56 then -- 0x38
set dialogMsg to file_ & " is a Studio 10.2.x library."
end if
if byteOne = 57 then -- 0x39
set dialogMsg to file_ & " is a Studio 11.0.x library."
end if
if byteThree = 1 then
set dialogMsg to dialogMsg & " (Unicode)"
end if
end if
display dialog dialogMsg buttons {"OK"} default button "OK"
end repeat
end open

_____________________________________________________________
Manage your list subscriptions athttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,a5CS2Qo7J-NSKH4GfMHyinX3tfw-JsasWNXXj1vw0wRcfgw_m_MdZR82e9NpzrgGmauX2NJQLcK7qFuXoTRlk26xlYSrQ51WSTaZk1MJYw,,&typo=1
Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com



<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.logicaldevelopments.com.au%2f&c=E,1,QTDYkbnXM5L3B7b6IprJIYMN2DcBsSlMApS8ymn16ceRKmRhMG5iMqQzWQ_VO2nlt1kK-mHzG06VIvYB649GgLP0c5s7Rm6-R2DdYQoGcA,,&typo=1>  Paul W Mulroney
Logical Developments
Customised Software Solutions
Ph: 08 9458 3889
We Don't Do Simple Pty Ltd
trading as
Logical Developments
ACN 161 009 374
<https://www.facebook.com/logicaldevelopmentswa/>  <https://twitter.com/WeDontDoSimple>  <https://www.linkedin.com/company/logicaldevelopments/>  <https://www.youtube.com/channel/UCPldVVgWR05WX3cVrR5WUQw>
_____________________________________________________________
Manage your list subscriptions athttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,JZkL97TLOH1Idcb-aiRZc5ikCml_bFOli9vdWLtFOlbcxtHCpln1ttvbjwveBOsSBMcUg6eEdqEe2oUfzhthOQXcL_gPi39Sls7RXl8g&typo=1
Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions athttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,uaFPfb8600CW0QsKNRn0wa4C8URv39jiRo6wgXn1Gd9YKWdUTPkAFMcwB28cE69VHc02txWrp4p4FszFNu__B8bC2ro7VYSaDnEzOQFNaS0aTohg&typo=1
Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,qZpyrikCnHTvuo-nPD0SuUPxIlrdx5s1wTvfE_IinoAq5gDwf4l0v30sDzapQjBM4yKmb29VTWgFaMTUpQgGglPnotuyovCOI3jF7gAE0OUkj3b7bHlX5Ok,&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com



More information about the omnisdev-en mailing list