Open webpage in full screen in running sketch at Processing - web

I wonder how I open webpage in full screen mode in running sketch at Processing.
I am making a simple question/answer game but before solving question. I want users to register or login website first. And then when pressed a certain button on webpage it brings back to start to question.
I appreciate any suggestions.

The answer to this is going to depend on exactly what you're trying to do.
Are you trying to do this from Java mode? If so, google something like "java launch webpage".
Are you trying to do this from JavaScript mode, or with Processing.js or p5.js? If so, google something like "JavaScript fullscreen" and you'll find examples like this and this.
That will allow you to open a webapge in fullscreen mode. Then going back to your Processing sketch again depends on whether you're using Java or JavaScript.
If you're using Java, this is going to be pretty difficult, as you aren't going to be able to get events from the webpage to your Java code. You could try using an applet, but I wouldn't really recommend that since applets are pretty much dead anyway.
If you're using JavaScript, then it's a little easier. You can simply detect the button click in the webpage (by adding an onclick callback) and then call whatever functions you want to close the webpage and reactivate your Processing sketch.
It's hard to answer general "how do I do this" type questions. Stack Overflow is more designed for specific "I tried X, expected Y, but got Z instead" type questions. I really recommend that you just try something out and post an MCVE showing exactly where you're stuck. Good luck.

Related

Handwriting widget for iBooks Author

I am looking for a widget (HTML5, Dashcode, Javascript, whatever) that will allow the user of a textbook published from iBooks Author to use their finger or stylus to hand write notes within the textbook itself. I am not sure if it is even possible.
Many students like taking handwritten notes while reading and this functionality would be awesome. The comment note is nice but I have had students say they earn better when actually writing the information.
You may be able to embed and adapt this finger painting demo (live example) in javascript within an HTML widget. Or any equivalent 'touch drawing' code.
However I would really recommend to not even try to implement this as solutions like swipe make typing on devices about as fast as handwriting.

Browser based Code Editor, with real tabbing?

I'm currently using CodeMirror as a browser based code editor, but what really annoys me is its lack of real tabbing. It uses spaces instead of tabs, and I just cant get my code as clean as desktop editor.
Are there any better editors out there? It can be DOM based or Javascript or even browser specific, just as long as it gives me real tabs! :)
PS. I've had a look at Ace, which looks like it should do the job, but I cant seem to get real tabs to work - anyone tried it?
Cheers,
Chris.

Recommendation for a multi-instance jquery dialog/overlay

Ok. had enough of trying out lightboxes, overlays and dialog boxes plugins. The problem is that very few of them support nested (multiple) dialog open at the same time - a typical requirement in my opinion.
I'm looking for a recommendation for a simple plugin that:
supports callsbacks for the usual onShow/onLoad... events
supports nested instances i.e. the user open a dialog, clicks a button on it, another dialog opens up while keeping the first one open in the background. In other words, it should support the closure of each instance programatically
is NOT the jquery ui dialog plugin
This came about after the big disappointment with SimpleModal's inability to support multiple modal boxes open simultaneously!!!! #EricM, why would you do that to me? why???? ;)
I have narrowed it down to jqModal and the jquery tools overlay. The usage of the latter is weird. Maybe i'm tired but i just don't get it.
So before i dive into jqModal, does anyone have any recommendation based on personal experience that will achieve what I'm trying to do?
thanks

How can I insert text into another application?

To scratch a personal itch, I'm writing something like a cross between a character map and an on-screen keyboard. When the user selects a character, I'd like to insert it into another application, specifically, the application that would next receive focus if my application were closed. Is there any way to do this? Right now, I work around it by just putting the character into the clipboard and terminating, leaving the user to hit paste in the other application, but usage would be far more streamlined if I could just insert the text programmatically.
I'm doing this in GTK and expect to run it only on Linux. But cross-platform solutions are also appreciated, and if GTK can't do it but some other toolkit can, I'll gladly switch.
This sounds like you should use libwnck, which is a GTK-related library that lets you manipulate windows on the desktop. The documentation is a little sparse, but the function wnck_screen_get_previously_active_window() seems promising.
From a WnckWindow you can get an X window ID, and perhaps from there you can use the X libraries to send a paste message (or even send it a "Ctrl-V" keypress event), perhaps with XSendEvent().
Very good question, by the way. I wish I could answer it more knowledgeably.

Non-blocking Dialog box in Applescript

I have to write a small script to deploy a patch for our Application. The patch
will replace a couple of files in the application.I decided to depploy the patch using Applescript. The files to be copied are quite large and it takes some time for the files to be copied. I wanted to know if there is any way I can get a dialog box which doesn't block the execution of the script so that I can display some message like Updating.. etc while the patch is applied and then close the dialog box after wards.
Thanks
Shivaprasad
There's a scripting addition called Akua Sweets (oldy but goody) that has a display progress command. Get it at osaxen.com. it's in the 'most popular' section at the top of the page.
edit
Oh, bugger, that's only for OS9. It was really useful back in the day, I remember using it a lot (of course everything took a lot longer in those days so progress bars were more in demand).
another edit
You got me inspired, there's a couple of scripts I use that need progress bars, so I went looking and found this scripting addition at http://osaxen.com/files/extrasuites1.1.html
and again
here's a basic tutorial for how to do it in interface builder. I think that's probably the right way to do it.
I myself ran into the same problem. Unfortunately applescript doesn't provide an easy way of implementing a progress bar.
I ended up using the stop loop example found here to build an application. This guy has a bunch of applescript studio xcode projects to download and mess around with. It's some really great sample code if you aren't too familiar with applescript studio.

Resources