Re: Need an Applescript Expert
Sweet thanks! Bob S > On Oct 24, 2017, at 11:37 , Mike Bonner via use-livecode > wrote: > > try this.. > set the shellcommand to "powershell" > set the hideconsolewindows to true > put shell("ls") > > should return a listing of files for the current directory. > > You could also make it interactive.. > open process "powershell" for update > write "ls" & cr to process "powershell" > read from process "powershell" until empty > put it -- all text including prompts/etc returned by powershell > close process "powershell" > > On Tue, Oct 24, 2017 at 11:26 AM, Bob Sneidar via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Ooookay I found a .NET port of iText called iTextSharp, and someone wrote >> a PowerShell module that can access it for the purposes of filling windows >> forms via the powershell. >> >> So now the question becomes, can Livecode access powershell? I suppose I >> can create a powershell script then launch it with shell or with Livecode's >> own file commands. >> >> Bob S >> >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Need an Applescript Expert
try this.. set the shellcommand to "powershell" set the hideconsolewindows to true put shell("ls") should return a listing of files for the current directory. You could also make it interactive.. open process "powershell" for update write "ls" & cr to process "powershell" read from process "powershell" until empty put it -- all text including prompts/etc returned by powershell close process "powershell" On Tue, Oct 24, 2017 at 11:26 AM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Ooookay I found a .NET port of iText called iTextSharp, and someone wrote > a PowerShell module that can access it for the purposes of filling windows > forms via the powershell. > > So now the question becomes, can Livecode access powershell? I suppose I > can create a powershell script then launch it with shell or with Livecode's > own file commands. > > Bob S > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Need an Applescript Expert
Ooookay I found a .NET port of iText called iTextSharp, and someone wrote a PowerShell module that can access it for the purposes of filling windows forms via the powershell. So now the question becomes, can Livecode access powershell? I suppose I can create a powershell script then launch it with shell or with Livecode's own file commands. Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Need an Applescript Expert
Ya none of this is working. Apparently getField is not a function that is exposed to the script editor. Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Need an Applescript Expert
> On Oct 24, 2017, at 03:03 , Pi Digital via use-livecode > wrote: > > Or then you could do this: > >> window.getField("technotes").value = "This is only a test."; > Can't find variable window. > That should make sense. If getField works that is. If not I would try > >> window.document.getElementById(“technotes”).value = “Test value”; > can't find variable window. > > This should steer you along the right path though. > > Sean Cole > Pi Digital > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Need an Applescript Expert
Hi Bob Outside of a browser you can use this to find out your running process id’s > function getSysRunningApps() { var oOutput = > document.getElementById("processDisplay"); oOutput.value = ""; oOutput.value > = getProcessList(); } Or use this for getting a running apps open active window > window = Acrobat.windows[0]; window.name(); Or then you could do this: > window.getField("technotes").value = "This is only a test."; That should make sense. If getField works that is. If not I would try > window.document.getElementById(“technotes”).value = “Test value”; This should steer you along the right path though. Sean Cole Pi Digital > On 24 Oct 2017, at 00:20, Ralph DiMola via use-livecode > wrote: > > Shake some dust off from my Acrobat JavaScript days... > I think you will have to open the document. You are in a new instance of > Acrobat without an currently open document. > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf > Of Bob Sneidar via use-livecode > Sent: Monday, October 23, 2017 6:57 PM > To: How to use LiveCode > Cc: Bob Sneidar > Subject: Need an Applescript Expert > > Hi all. > > When populating forms on a Macintosh, I figured out a nice little hack which > allows me to populate a fillable form with values using AppleScript. The > trick is to tell Applescript to tell Acrobat to run a Javascript! Seems a > little convoluted but it works great. > > So I discovered recently that Applescript can run Javascript natively! > Great. I figured I would bypass applescript and pass javascript directly! > But I've run ingo a snag. Here is a quick sample of what works: > > tell application "/Applications/Adobe Acrobat DC/Adobe Acrobat.app" > set theScript to "this.getField(\"technotes\").value = \"This is only a > test. \";" > do script theScript > end tell > > Don't let the backslash quotes trip you up I am just escapting quote > characters. Now the Javascript version *should* look like this but it does > NOT work! > > Acrobat = Application('Adobe Acrobat'); > Acrobat.activate(); > delay(1); > > this.getField("technotes").value = "This is only a test."; > > I get an error that this.getField is undefined! Wha??? Why does it work > as an applescript command then?? > > Bob S > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Need an Applescript Expert
Shake some dust off from my Acrobat JavaScript days... I think you will have to open the document. You are in a new instance of Acrobat without an currently open document. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Bob Sneidar via use-livecode Sent: Monday, October 23, 2017 6:57 PM To: How to use LiveCode Cc: Bob Sneidar Subject: Need an Applescript Expert Hi all. When populating forms on a Macintosh, I figured out a nice little hack which allows me to populate a fillable form with values using AppleScript. The trick is to tell Applescript to tell Acrobat to run a Javascript! Seems a little convoluted but it works great. So I discovered recently that Applescript can run Javascript natively! Great. I figured I would bypass applescript and pass javascript directly! But I've run ingo a snag. Here is a quick sample of what works: tell application "/Applications/Adobe Acrobat DC/Adobe Acrobat.app" set theScript to "this.getField(\"technotes\").value = \"This is only a test. \";" do script theScript end tell Don't let the backslash quotes trip you up I am just escapting quote characters. Now the Javascript version *should* look like this but it does NOT work! Acrobat = Application('Adobe Acrobat'); Acrobat.activate(); delay(1); this.getField("technotes").value = "This is only a test."; I get an error that this.getField is undefined! Wha??? Why does it work as an applescript command then?? Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Need an Applescript Expert
Hi all. When populating forms on a Macintosh, I figured out a nice little hack which allows me to populate a fillable form with values using AppleScript. The trick is to tell Applescript to tell Acrobat to run a Javascript! Seems a little convoluted but it works great. So I discovered recently that Applescript can run Javascript natively! Great. I figured I would bypass applescript and pass javascript directly! But I've run ingo a snag. Here is a quick sample of what works: tell application "/Applications/Adobe Acrobat DC/Adobe Acrobat.app" set theScript to "this.getField(\"technotes\").value = \"This is only a test. \";" do script theScript end tell Don't let the backslash quotes trip you up I am just escapting quote characters. Now the Javascript version *should* look like this but it does NOT work! Acrobat = Application('Adobe Acrobat'); Acrobat.activate(); delay(1); this.getField("technotes").value = "This is only a test."; I get an error that this.getField is undefined! Wha??? Why does it work as an applescript command then?? Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode