Whooh! I made something tiny in #javascript! Actually #processing on the Khan Academy page! The Deus Ex: Mankind Divided loading triangle thingy. See it live and play around with the #code here: khanacademy.org/computer-programming/dx-triangle/5922801909268480
Category: dev
a2 – the first humble steps
My wannabe ac’tivAid replacement script framework a2 is finally getting some momentum!:
Still heavily wip! But at least now it actually does something!!
I also made an animated diagram to show how the a2 cycle rolls:
But well, that’s probably not too obvious, is it? So first things first. Since I never posted about this:
What is this about!? ac’tivAid was already some kind of framework to put together Autohotkey scripts.
AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.
ac’tivAid bundled a whole bunch of those in one Autohotkey runtime and you could enable/disable them, make settings and all that. Why am I talking in past tense? You can still download latest ac’tivAid dev version from Michael Telgkamps homepage. It’s still kinda nice but things start to break and really nobody is maintaining it.
But fear not: I’m about to present you the future! :] on the github wiki I put together some of the goals:
- decoupled ui and runtime
- use of latest Autohotkey_L
- active open source development
- easier contributing, setup, better flexibility
And actually I tackled all of those points already to some extent. The ones that recently make me jump in circles out of coding excitement are the following:
- new script creation (with meta data) and editing
- support for global and context sensitive hotkeys
- instant change of hotkeys
Next up: some improvements to the scope and hotkey setup, making sure there’s only one ui and one ahk-runtime at a time, implement setting variables (fields, checkboxes) and a looooot of security checks. Currently it’s super easy to blow yourself up. So it will take a wile until this can go puplic.
I’m really looking forward to making some videos on how to use and how to develop for it.
[Hello World 1K]
vimeo bigger video
A little more JavaScripting.. If you go to vimeo. e.g. like this:
http://vimeo.com/18047390
you might recognize that the video is quite small and you cannot do something about it (besides fullscreen, and waiting 3,5h for the flash-Esc-fullscreen message to disappear). Now you can!
- install greasemonkey (oh! .. ehmm for Firefox of course! But Chrome can handle userscripts by default? Says mychromeaddons.com. At the installing-page of userscripts.org is nothing about that yet 🙁 however…)
- install my little script: vimeo bigger video
- resizes only on video page
- resizes video scroller on the right too
- removes flash scrollbar, reactivates standard one (flash-Thing was bugging me)
- voilà:
btw: userscripts.org is a little slow these days. Here is a backup: vimeo_bigger_video.user.js
vimeo bigger video
Nochn kleines bißchen mehr JavaScripterei.. Wenn du mal zu vimeo gehst. So z.B.:
http://vimeo.com/18047390
dann müsst du feststellen, dass das Video relativ klein ist und man daran nix ändern kann (ausser Vollbild natürlich und gefühlte 3,5h auf das Ausblenden der flash-Escape-Meldung warten). Kann man jetzt!
- greasemonkey installieren (oh! .. ähmm für Firefox natürlich! Aber Chrome kann irgendwie userscripts by default? Steht hier bei mychromeaddons.com. Auf der installing-Seite bei userscripts.org steht davon allerdings noch nix 🙁 na wie auch immer…)
- mein kleines script: vimeo bigger video installieren
- jetzt wird nur noch auf video-Seiten resized
- der Video-Scroller rechts wird auch angepasst
- flash-Scrollbar raus, normale Scrollbar reaktiviert (das flash-Ding hat bei mir gezickt)
- voilà:
btw: userscripts.org is gerade ganz schön lahm manchmal. Hier isn backup bei mir: vimeo_bigger_video.user.js
Spiegel.de Fotostrecke Anpassen
Der Herr * hatte mal nen schönes Greasemonkey-Script für die Spiegel Online Fotostrecke geschrieben.: Spiegel Online Fotostrecke Anpassen. Das nimmt diese doofe Übersichtsseite (z.B.) aus der Schleife und man kann die Fotos einfach durchklicken und kommt am Anfang wieder an ohne zu denken: ÄHH! WASn JETZT los? SPAM?
Leider geht das nich mehr. Wurde zwar im September erst geupdatet aber offensichtlich wurde da ne Menge auf Spiegel.de im Hintergrund umgestellt. Na ich hab mich ma beigemacht das wieder geradezubiegen und habs tatsächlich fast neu geschrieben:
Spiegel.de Fotostrecke Anpassen
Noch bin ich nen Javascript-n00b. Also der Code sieht vielleicht etwas unelegant aus. Zb. hab ichs nicht auf die Reihe bekommen die “1 VON 15″ Zeichenkette einfach zu spalten weil dort statt normalen ” “-Freizeichen “ ” eingebaut wurde… Aber wie auch immer: Jetzt gehts!
Update: Ich musste nochma ran. Die ham nochmehr von diesen dümmlichen “ ” eingebaut… backup hier: spiegel_online_fotostrec.user.js
returnNewNodes(rnn)
For all the Maya scripting grandpas: For when you import files and want to know whats new: There is actually a returnNewNodes-flag at the file command! In former times (<v9) you had to code that all by yourself.. So there definitively wasn’t everything better! There^ you got it!
I just chatted about that with Nathan:
eRiC
13:02: but when importing.. yea a success statement would be nice
13:02: or an array of imported objects!
13:03: THAT would be good
Naughty
13:03: now that would be very good!
13:03: 🙂
eRiC
13:03: 😀
Naughty
13:03: I had to write a function to do that
eRiC
13:03: yea me too!
That was actually about me finding a candidate for more Maya stupid-ness: In the file command docs at import they write that it returns the filename. That is you put something into it and it gives you back the same… bollocks.
(it fails somehow as there are lots of other commands that do it similar. But here it doesn’t even work! And there is no way of importing without a given filename. Contrary to creating a control for instance.)
returnNewNodes(rnn)
Für die ganzen ollen Maya Scripter: Wenn man Dateien importiert und wissen will was überhaupt reingekommen ist: Es gibt doch tatsächlich nen returnNewNodes-Flag am file command! Früher (<v9) musste man sich sowas alles noch selber coden.. Also war definitiv nicht alles besser! Da^! Den Beweis!
Hab vorhin erst darüber mit Nathan gechattet:
eRiC
13:02: but when importing.. yea a success statement would be nice
13:02: or an array of imported objects!
13:03: THAT would be good
Naughty
13:03: now that would be very good!
13:03: 🙂
eRiC
13:03: 😀
Naughty
13:03: I had to write a function to do that
eRiC
13:03: yea me too!
Da gings eigentlich darum, daß ich dachte ich hätte eine lustige Macke von Maya gefunden: In den file-Kommando-Docs steht beim import flag, daß es den filename zurückgibt. Also gibt man einen Namen an den man dann zurückbekommt… fürn Arsch.
(is leider kein guter Kanditat: Es gibt jede Menge commands die das ähnlich machen. Aber: Hier funktionierts nichmal!! Und es gibt keine Möglichkeit zu importieren ohne nen filename anzugeben. Im Gegensatz zum Erstellen von controls.)
scripting me
Yes! A scripting post. I could apologize (via) but I rather don’t ;]
First the most recent stuff! 2 tiny tiny micro nano releases:
You know, creativity comes from when not satisfied with the present. And this time I again was unsatisfied with the game page of minecraft. When playing on a widesceen display this 8xx width is just too tiny and fullscreen is inapropriate either when you cannot focus on the game entirely… (having these blocky graphics on 1920×1080 doesn’t cut it anyway)
So, I started Firebug over again, stretched minecrafts java applet plus the surrounding layout manually. But this time I thought: “Darn someone must have done this before!” And I was right! Now all the snippets on userscripts.org didn’t seem to work for me. I read some of the code and seems I fixed what was missing:
before / after:
Hooray! And as I browsed through the handful actually installed scripts I’ve seen another stub that seemed to not work so far. First was easy, so lets do another round I thought! This time it was a little more complicated. On golem.de the center column can only found by a class name. But there are functions for that: dustindiaz.com/getelementsbyclass.
before / after:
So I managed to shed a little more light on my JavaScript insight. I don’t know if the ice is already broken and if there will be more now.. But as I read mr.doob already JS was interesting to me already for long.
On the other hand I made huge progress on the Python side. Maya-toolwise that is so far. But I guess I’m far from releasing something. Not to forget that is out now! That means I maybe tinker around with Qt via Python soon 😀
Before I forget!: There is more scripting news! It’s already a little late but important to say: Autohotkey is now Autohotkey_L. Meaning the main developer chris turned away from it and handed over to the really ambitious guy Lexicos. The L version supports objects, arrays, 64bit support and Unicode! うん!
I don’t know what that means for ac’tivAid so far. I’m still willing to support it however and whenever (more importantly 🙁 ) I can. But could be quite some work to finally port it from basic to L.
Whoops I tagged it MEL too…. hmm what can I say about that? Nothing new.. Work still involves a lot of Maya and so Mel but there is no real progression. Mel is dead already. And thats good that way. I still does a lot of workload but it deserves to rest 🙂
say HERE on google maps
Short Story: Want a short link to a spot on google maps? Without a url-shortener service?
look it up at gmaps, get an about 200digit “link” from the upper right, throw away anything but http://maps.google.com/? the ll= and the z=-tags:
http://maps.google.com/?ll=40.662404,-73.972113&z=20
want a marker? Rightklick on a map and say “What’s here?”, get the link from upper right and do the same but with the q=-tag included:
http://maps.google.com/?q=40.662434,-73.972099&ll=40.662487,-73.972113&z=20
For that I made a small Autohotkey script to use with ac’tivAid.:
If you are Autohotkey-able you could easily add an own hotkey to the script.. but … ;]
if you want the whole rant…: Continue reading “say HERE on google maps”