[haiku-development] Re: A question on Haiku scripting

  • From: "Andrew Hudson" <dmarc-noreply-modpost@xxxxxxxxxxxxx> (Redacted sender "hudsonco1" for DMARC)
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 28 Dec 2015 12:46:21 -0500


-----Original Message-----
From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
To: haiku-development <haiku-development@xxxxxxxxxxxxx>
Sent: Sun, Dec 27, 2015 7:07 pm
Subject: [haiku-development] Re: A question on Haiku scripting

As I was sitting around with nothing much to do (:-/) I went and verified
what Humdiger says. However many ShowImage windows you open,
only one instance of the app is actually running. The various windows
can be accessed by index. (Though ShowImage seems to have a lot of
dormant windows. The images are all the odd-numbered ones.)

So for example, if ShowImage is running, I can do (as per the hey docs):

> hey application/x-vnd.Haiku-ShowImage load
'file(/boot/WORK/PHOTOS/tiger.jpg)'

Then:

> hey application/x-vnd.Haiku-ShowImage count Window
Reply BMessage(B_REPLY):
"result" (B_INT32_TYPE) : 3 (0x00000003)
"error" (B_INT32_TYPE) : 0 (0x00000000)

> hey application/x-vnd.Haiku-ShowImage get Title of Window 1
Reply BMessage(B_REPLY):
"result" (B_STRING_TYPE) : "/boot/WORK/PHOTOS/tiger.jpg"

... and so on. (Indices will change if you quit windows, of course.)

Isn't that pretty much what you want?

-- Pete --


Thanks, guys, this is definitely an option forward for scripting image display.
I am looking to do the same
for scripting display of multiple videos.


Regards,
Andrew

Other related posts: