Re: regex in Satimage OSAX doesn't work the way I expected
Re: regex in Satimage OSAX doesn't work the way I expected
- Subject: Re: regex in Satimage OSAX doesn't work the way I expected
- From: Emmanuel LEVY <email@hidden>
- Date: Wed, 03 Oct 2012 15:57:24 +0200
Glad you use Satimage.osax.
Though, usually people who spend much time parsing text from an HTML page might want to start using XMLLib.osax.
You can use XMLLib.osax even on semi-well-formed HTML provided you say XMLOpen with html4 failure level 3.
Emmanuel
On Oct 3, 2012, at 3:22 PM, Jim Brandt wrote:
> Chris,
>
> Thanks for the handlers. I'm sure it'll help.
>
> I spent the entire afternoon yesterday working through ONE handler I have that parses text from an HTML page, changing my TextCommand code to Satimage OSAX. Basically I started at the top and a section at a time moved the all-encompassing "tell application "TextCommands" line down as I worked the the section above. I had some lines like "if (check Column4 contains DateString) …" that I had to rework into a try block around the find text command. A handler for that might be a better solution.
>
> I'm not sure using the OSAX is any faster (thought it probably is) but it is less typing than tell block everywhere :)
>
> Don't have Script Debugger (can't justify $200 for hobby scripting) and don't have a text shortcut app like Typinator so I plod on.
>
> I got so engrossed with making it work yesterday I almost missed a meeting I had to go to. <sigh>
>
>
> Jim
>
>
> On 2-Oct-2012, at 10:42 PM, email@hidden wrote:
>
>> Hey Jim,
>>
>> That problem with writing regex instead of with regexp was a big issue for me when I first started using the Satimage.osax.
>>
>> I ended up just creating several handlers in find.lib.scpt and embedding them in my Script Debugger templates. I then use Typinator or SD's own text-expansions to emplace the handler calls, so I never have to type them.
>>
>> My basic change handler:
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden