Walking Trip …

Walking Trip

Walking Trip

Offenbach's Suite ... Warts 'n All

Offenbach's Suite ... Warts 'n All

 📅  

If this was interesting you may be interested in this too.

Posted in Photography, Trips | Tagged , , | 34 Comments

Text to Speech Hashtagging Tutorial

Text to Speech Hashtagging Tutorial

Text to Speech Hashtagging Tutorial

Around here … it’s official …

we’re having a morph!

Please … please … no congratulations yet?! And thanks for the tomatoes … very ripe?!

Anyway, yesterday’s Local Operating System Menu Intranet Feel Commentary Tutorial has struck a chord in that for …


macOS

… users we think there is a different aspect to ideas revolving around …

  • speech … and …
  • text

… we want to pursue. We’ve already forewarned above, of exclusions, but for full functionality with these ideas there probably will be more to follow.

Around here there is no adage “let perfection be the enemy of the good” and so “on we go”, but, a precursor is to introduce …

  • our inhouse macOS “say” interfacing PHP … to …
  • more independent hashtagging smarts

… hashtagging (as we’ve been harping on about more and more recently) being …

  • able to support a lot of data up at any URL (eg. of a web browser address bar, and so can help interface a public domain “Internet” URL talking to a local (eg. MAMP Apache web server based) web server “Intranet” feeling URL) …
  • can support dynamic scenarios with web application webpages (especially PHP ones) where the webpage can achieve things dynamically without navigating to another webpage

But aren’t we going to confront CORS restrictions here?

Well … shhhhhh … but a named HTML iframe child and a window.open

<?php

$issayable='';
$vcb="Alex";
$vvcb="";
if (PHP_OS == "Darwin") {
$issayable='y';
if (isset($_GET['saythis']) && $vvcb == "") {
$vvcb=str_replace(' ',' +',str_replace('+',' ',urldecode($_GET['saythis'])));
}
if (isset($_GET['voice'])) {
$vcb=explode(' ',str_replace('+',' ',urldecode($_GET['voice'])))[0];
}
if (isset($_GET['justsayingforafriend']) && $vvcb != "") {
exec('say -v ' . $vcb . ' ' . $vvcb);
exit;
}
}

<?php echo ”

var saymode='" . $dsm . "';
var issayable='" . $issayable . "';
var lastlhis='', lastlhthingo='',lhlook=false;


function lastlhex() {
if (lastlhis != document.getElementById('theproofif').src) {
lastlhis=document.getElementById('theproofif').src;
} else if (lastlhthingo != ('' + location.hash)) {
lastlhthingo=('' + location.hash);
if ((issayable == 'y' || ('' + navigator.platform).toLowerCase().indexOf('mac') == 0) && ('' + document.URL + '#' + decodeURIComponent(('' + location.hash))).indexOf('saythis=') != -1 && ('' + document.URL + '#' + decodeURIComponent(('' + location.hash))).indexOf('media=') == -1) {
if ((issayable == 'y' || ('' + navigator.platform).toLowerCase().indexOf('mac') == 0) && ('' + document.URL + '#' + decodeURIComponent(('' + location.hash))).indexOf('voice=') != -1 && ('' + document.URL + '#' + decodeURIComponent(('' + location.hash))).indexOf('media=') == -1) {
if (document.getElementById('svoicecode').innerHTML.indexOf(decodeURIComponent(document.URL.split('voice=')[1].split('&')[0].split('#')[0]).replace(/\+/g,' ').replace(/\ \ /g,' +') + '\"') != -1) {
document.getElementById('svoicecode').value=document.getElementById('svoicecode').innerHTML.split(decodeURIComponent(document.URL.split('voice=')[1].split('&')[0].split('#')[0]).replace(/\\+/g,' ').replace(/\\ \\ /g,' +') + '\"')[0].split('\"')[eval(-1 + document.getElementById('svoicecode').innerHTML.split(decodeURIComponent(document.URL.split('voice=')[1].split('&')[0].split('#')[0]).replace(/\\+/g,' ').replace(/\\ \\ /g,' +') + '\"')[0].split('\"').length)] + decodeURIComponent(document.URL.split('voice=')[1].split('&')[0].split('#')[0]).replace(/\\+/g,' ').replace(/\\ \\ /g,' +');
}
}
document.getElementById('thewords').value=decodeURIComponent(document.URL.split('saythis=')[1].split('&')[0].split('#')[0]).replace(/\+/g,' ').replace(/\ \ /g,' +');
if (56 == 56) {
if (issayable == 'y') {
document.getElementById('theproofif').src='HTTP://localhost:8888/macos_say_record.php?justsayingforafriend=y&voice=' + document.getElementById('svoicecode').value.split(' ')[eval(-1 + document.getElementById('svoicecode').value.split(' ').length)] + '&saythis=' + encodeURIComponent(document.getElementById('thewords').value);
} else {
window.open('HTTP://localhost:8888/macos_say_record.php?justsayingforafriend=y&voice=' + document.getElementById('svoicecode').value.split(' ')[eval(-1 + document.getElementById('svoicecode').value.split(' ').length)] + '&saythis=' + encodeURIComponent(document.getElementById('thewords').value), 'theproofif');
}
} else {
zhr = new XMLHttpRequest();
zform=new FormData();
zform.append('justsayingforafriend', 'y');
zform.append('saythis', document.getElementById('thewords').value);
zform.append('voice', document.getElementById('svoicecode').value.split(' ')[eval(-1 + document.getElementById('svoicecode').value.split(' ').length)]);
zhr.open('get', 'HTTP://localhost:8888/macos_say_record.php', true);
zhr.send(zform);
}
}
}
}

“; ?>
<?php echo ”

<iframe data-onerror=alert(564); onload=resproof(this); name=theproofif id=theproofif style=display:none; src='/About_Us.html'></iframe>

“; ?>

… can be that “Fred and Ginger” pairing to make this “Internet and Intranet” interplay seamless … shhhhhhh!

That being said, if you are a macOS user with a local web server like MAMP installed we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php (where macOS users who have downloaded to an 8888 port MAMP local Apacahe web server can click/try the user editable HtTp://localhost:8888/macos_say_record.php?justsayingforafriend=y&saythis=Welcome+one+and+all&voice=Karen) and try at the public RJM Programming website via this link or below …


Previous relevant Local Operating System Menu Intranet Feel Commentary Tutorial is shown below.

Local Operating System Menu Intranet Feel Commentary Tutorial

Local Operating System Menu Intranet Feel Commentary Tutorial

Further to yesterday’s Local Operating System Menu Intranet Feel Operator Tutorial there are a couple of macOS specific additional pieces of functionality we’d like to offer users, they being …

  1. the macOS open command has the ability to try to open any windows it creates in the background via it’s …

    -g

    … switch
  2. as we are on macOS why not offer a Text to Speech means of adding commentary as macOS open commands are issued via its …

    say

    … command

? And closing arguments against this will be accepted up until the end of Black Friday sales, whenever that is?!

We decided to pass these over as your usual get arguments on the address bar URL, being as we are always using PHP $_GET[] data, now, so far, in this project.

And so, yet again, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Operator Tutorial is shown below.

Local Operating System Menu Intranet Feel Operator Tutorial

Local Operating System Menu Intranet Feel Operator Tutorial

Further to yesterday’s Local Operating System Menu Intranet Feel Options Tutorial we broach the issue …

What happens when a delimiter character is the same as an operator character in amongst data sent via HTML form from one webpage to the next webpage?

We’re talking about the + character which can be …

  • a space encryption character used a lot when PHP is the receiving webpage’s language
  • an operator in mathematics, for addition

If the latter is the meaning of a + plus character within that form data sent out, how can we know it is not just a space character encrypted?

Excellent question, that we grapple with in different ways around here, all the time!

Today, as far as this goes, take a look at the value attribute of a new macOS dropdown option we introduced today …

<?php

$selstuff="<br><br><form onsubmit=\"formclickmode=0; document.body.style.cursor='pointer'; if (lastselo) { lastselo.style.cursor='pointer'; lastselo=null; } if (document.getElementById('opsel')) { if (document.getElementById('opsel').value.length > 0) { this.action=document.getElementById('opsel').value; } } return perhaps(true,this);\" id=myform method=GET action='./open_extravaganza.php'><select title='Right click can modify dropdown choices' style=background-color:yellow; size=18 id=mysel multiple name=afteropen onchange=\"if (this.value.length != 0) { if (1 == 1) { formclickmode=prg(1,event.target); } else { document.getElementById('sbutmac').click(); } } \"><option oncontextmenu=ocmopt(this); value=''>Select macOS open command type(s) below ...</option><option oncontextmenu=ocmopt(this); value=' -a Finder'>Finder</option><option oncontextmenu=ocmopt(this); value=' -a Preview'>Preview</option><option oncontextmenu=ocmopt(this); value=' -a TextEdit'>TextEdit</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceMemos'>Voice Memo</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.QuickTimePlayerX https://www.rjmprogramming.com.au/Windows/windows_step_recorder.mov'>QuickTime Player</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceOverUtility'>VoiceOver Utility</option><option oncontextmenu=ocmopt(this); value=' ~/Desktop/Screen\\ Shot\\ *.png'>Preview all screenshot files</option><option oncontextmenu=ocmopt(this); value=' -a Firefox https://www.rjmprogramming.com.au'>Firefox</option><option oncontextmenu=ocmopt(this); value=' -a Safari http://localhost:8888/macos_say_record.php?saythis=Welcome\\&voice=Karen\\&audioname=;open -a Safari http://localhost:8888/macos_say_record.php'>Safari interface attempt to say</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.ScriptEditor2 ~/Desktop/test_gvp.scpt'>AppleScript example ready to Script->Run</option><option oncontextmenu=ocmopt(this); value=\"IGVjaG8gJzU2NCs5ODc2NScgfCBiYw==\">Add 564 to 98765</option><option oncontextmenu=ocmopt(this); value=' ~/Documents ~/Desktop ~/Downloads'>Open the D folders</option><option oncontextmenu=ocmopt(this); value=' https://google.com'>Google</option><option oncontextmenu=ocmopt(this); value=' https://wikipedia.org'>Wikipedia</option><option oncontextmenu=ocmopt(this); value=' https://www.rjmprogramming.com.au'>RJM Programming</option><option oncontextmenu=ocmopt(this); value='ls -l . | open -f'>Pipe folder listing into TextEdit</option><option oncontextmenu=ocmopt(this); value='x-man-page://open'>Show man page in Terminal</option></select><br><br><input id=sbutmac type=submit value='Execute'></input></form>";

?>

Do you recognize any new encryption pattern with this option’s value? Yes, it is the …

base64 encoded

… version of …


echo '564+98765' | bc

… as a macOS Terminal application command line way to add 564 + 98765 via the macOS bc command, we got wind of via …


<html>
<body>
<script type=text/javascript>
var x=prompt('' + window.btoa(" echo '564+98765' | bc"), '' + window.btoa(" echo '564+98765' | bc"));
</script>
</body>
</html>

… and please be assured if one of your own dropdown option entry values contains a + character you do not have to do the work above (unless you are a masochist, that is), rather the web application can help you out.

Which begs the question …

If window.btoa is the “Fred” of the Javascript side of the work, what is the PHP receiving side’s “Ginger”?

Well, yes, would that be base64_decode pray tell?!

<?php

$plusin='+';
$plusout=' ';

$fromsc='~/Desktop/test_gvp.scpt';
$tosc='~/Desktop/test_gvp.scpt';

function oururldecode($ofwhat) {
global $plusin, $plusout, $fromsc, $tosc;
$interim=str_replace($fromsc,$tosc,urldecode($ofwhat));
if (strpos($interim, ' ') === false || substr(($interim . 'x'),0,1) == '+') {
$plusin=' ';
$plusout=' ';
return str_replace($fromsc,$tosc,base64_decode($ofwhat));
} else {
$plusin='+';
$plusout=' ';
}
return $interim;
}


if (isset($_GET['afteropen'])) {
if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
array_push($afteropens, str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0]))));
}
} else {
$afteropen=(trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))) == '' ? '' : ' ' . trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))));
$afteropens=[$afteropen];
}
}

?>

This offers a dynamic way to swap between the concepts, whose logic depends a bit on that first value character always being a space in this project. But that is so, and so this thinking helps a lot, and allows for that differentiation of + character meaning between (the rare) + operator (in mathematics) meaning and the + character PHP space character encryption meaning.

Today we’re also introducing an AppleScript interfacing option, and with the “say” option we now allow for command conjoining with the dropdown option value as long as the open directly follows on from the semicolon conjoining think it’s an operator!

And so, again, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below

Did you know?

Have you noticed in amongst the macOS open command values lots of ones starting with the switch …


-b

? Well, The macOS open command, thanks, told us …

You can specify just the name of an application or the full path, i.e. /Applications/Preview.app. If you need to be specific, you can also specify an application’s bundle identifier with -b com.apple.Preview.

… found out, we’ve been finding, successfully, via …

  1. in Finder right click the application of interest
  2. click Show Package Contents
  3. open the info.plist file in your favourite Text Editor
  4. look for …

    CFBundleIdentifier

    … within, for example, AppleScript’s info.plist …

    <key>CFBundleIdentifier</key>
    <string>com.apple.ScriptEditor2</string>

    … to come up with, for example …

    open -b com.apple.ScriptEditor2

    … as a way to open macOS application AppleScript (or Script Editor)


Previous relevant Local Operating System Menu Intranet Feel Options Tutorial is shown below.

Local Operating System Menu Intranet Feel Options Tutorial

Local Operating System Menu Intranet Feel Options Tutorial

A static list of options in the functional dropdown, as with yesterday’s Local Operating System Menu Intranet Feel Windows Tutorial does not sound as much fun as …

  • dropdown (ie. select element) options that if you right click bring up a means by which …
    1. existant option can be modified
    2. a new option can be added
    3. the option pointed at effectively nullified
    4. an option to remember for next time on that web browser when the web application is re-opened
    5. an option to forget the previous option’s work … it works! … we’ve already forgotten! … chortle, chortle

    … and we decided also, now that the user has some control over functionality, then …

  • offer email and/or SMS sharing including or excluding any option tinkering as described above
  • offer more Windows explorer.exe options thanks to https://www.geoffchappell.com/studies/windows/shell/explorer/cmdline.htm
  • offer the chance off an RJM Programming incarnation’s top MAMP/macOS/Windows dropdown (ie. select element, now showing with size attribute 3) right click chances to adjust Apache (eg. MAMP) port setting assumptions

And so, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Windows Tutorial is shown below.

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Yesterday’s Local Operating System Menu Intranet Feel Multiple Tutorial‘s smarts regarding dropdown multiple selections gets passed through to today’s …

Windows MAMP PHP 7.4.16

oh, oh “They’re mentioning version numbers … that can’t be good” … interfacing work.

And yes, it was a struggle, with this PHP version on MAMP disallowing …

  • file_put_contents … and, we would guess, file_get_contents …
  • exec or shell_exec or passthru or system
  • fopen writing to any *.bat

… and so, what we ended up with was an “as you login it starts” lookfor_extravaganza.bat we wrote that has less qualms with all these security matters happening in PHP, looking like lookfor_extravaganza.bat (where you could consider the timeout command rather than our ping means to introduce a sleep/wait) …


rem lookfor_extravaganza.bat
rem RJM Programming
rem November, 2025
rem Help out open_extravaganza.php on local Windows MAMP incarnation regarding no file_put_contents nor exec nor shell_exec allowed
rem Installed via ...
rem Win + R
rem shell:startup
rem ... copied into place via advice of ...
rem https://www.google.com/search?q=continuousnning+in+background+at+login&rlz=1C5OZZY_en&oq=continuousnning+in+background++at+login&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKABMgkIAhAhGAoYoAEyCQgDECEYChigAdIBCjc1MjA1ajBqMTWoAgCwAgA&sourceid=chrome&ie=UTF-8
@echo off
cd C:\MAMP\htdocs
echo y > c:\MAMP\htdocs\open_extravaganza.y
:top
if exist c:\MAMP\htdocs\open_extravaganza.bxt rename c:\MAMP\htdocs\open_extravaganza.bxt open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat call c:\MAMP\htdocs\open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat erase c:\MAMP\htdocs\open_extravaganza.bat < c:\MAMP\htdocs\open_extravaganza.y ping /w 5000 127.0.0.1 > NUL
goto top

… leaving the PHP to just arrange that c:\MAMP\htdocs\open_extravaganza.bxt gets written via fopen means. Did you read above about where to “plonk” a DOS *.bat so that it starts up on logging in, as per …

Win + R
shell:startup
… copied into place via advice of …

this great advice, thanks … being, perhaps, simpler than Task Schedular thoughts?!

No time to see what else explorer.exe File Explorer is capable of … that is for another day we’re thinking?!

Anyway, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Multiple Tutorial is shown below.

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Commentary Tutorial

Local Operating System Menu Intranet Feel Commentary Tutorial

Local Operating System Menu Intranet Feel Commentary Tutorial

Further to yesterday’s Local Operating System Menu Intranet Feel Operator Tutorial there are a couple of macOS specific additional pieces of functionality we’d like to offer users, they being …

  1. the macOS open command has the ability to try to open any windows it creates in the background via it’s …

    -g

    … switch
  2. as we are on macOS why not offer a Text to Speech means of adding commentary as macOS open commands are issued via its …

    say

    … command

? And closing arguments against this will be accepted up until the end of Black Friday sales, whenever that is?!

We decided to pass these over as your usual get arguments on the address bar URL, being as we are always using PHP $_GET[] data, now, so far, in this project.

And so, yet again, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Operator Tutorial is shown below.

Local Operating System Menu Intranet Feel Operator Tutorial

Local Operating System Menu Intranet Feel Operator Tutorial

Further to yesterday’s Local Operating System Menu Intranet Feel Options Tutorial we broach the issue …

What happens when a delimiter character is the same as an operator character in amongst data sent via HTML form from one webpage to the next webpage?

We’re talking about the + character which can be …

  • a space encryption character used a lot when PHP is the receiving webpage’s language
  • an operator in mathematics, for addition

If the latter is the meaning of a + plus character within that form data sent out, how can we know it is not just a space character encrypted?

Excellent question, that we grapple with in different ways around here, all the time!

Today, as far as this goes, take a look at the value attribute of a new macOS dropdown option we introduced today …

<?php

$selstuff="<br><br><form onsubmit=\"formclickmode=0; document.body.style.cursor='pointer'; if (lastselo) { lastselo.style.cursor='pointer'; lastselo=null; } if (document.getElementById('opsel')) { if (document.getElementById('opsel').value.length > 0) { this.action=document.getElementById('opsel').value; } } return perhaps(true,this);\" id=myform method=GET action='./open_extravaganza.php'><select title='Right click can modify dropdown choices' style=background-color:yellow; size=18 id=mysel multiple name=afteropen onchange=\"if (this.value.length != 0) { if (1 == 1) { formclickmode=prg(1,event.target); } else { document.getElementById('sbutmac').click(); } } \"><option oncontextmenu=ocmopt(this); value=''>Select macOS open command type(s) below ...</option><option oncontextmenu=ocmopt(this); value=' -a Finder'>Finder</option><option oncontextmenu=ocmopt(this); value=' -a Preview'>Preview</option><option oncontextmenu=ocmopt(this); value=' -a TextEdit'>TextEdit</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceMemos'>Voice Memo</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.QuickTimePlayerX https://www.rjmprogramming.com.au/Windows/windows_step_recorder.mov'>QuickTime Player</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceOverUtility'>VoiceOver Utility</option><option oncontextmenu=ocmopt(this); value=' ~/Desktop/Screen\\ Shot\\ *.png'>Preview all screenshot files</option><option oncontextmenu=ocmopt(this); value=' -a Firefox https://www.rjmprogramming.com.au'>Firefox</option><option oncontextmenu=ocmopt(this); value=' -a Safari http://localhost:8888/macos_say_record.php?saythis=Welcome\\&voice=Karen\\&audioname=;open -a Safari http://localhost:8888/macos_say_record.php'>Safari interface attempt to say</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.ScriptEditor2 ~/Desktop/test_gvp.scpt'>AppleScript example ready to Script->Run</option><option oncontextmenu=ocmopt(this); value=\"IGVjaG8gJzU2NCs5ODc2NScgfCBiYw==\">Add 564 to 98765</option><option oncontextmenu=ocmopt(this); value=' ~/Documents ~/Desktop ~/Downloads'>Open the D folders</option><option oncontextmenu=ocmopt(this); value=' https://google.com'>Google</option><option oncontextmenu=ocmopt(this); value=' https://wikipedia.org'>Wikipedia</option><option oncontextmenu=ocmopt(this); value=' https://www.rjmprogramming.com.au'>RJM Programming</option><option oncontextmenu=ocmopt(this); value='ls -l . | open -f'>Pipe folder listing into TextEdit</option><option oncontextmenu=ocmopt(this); value='x-man-page://open'>Show man page in Terminal</option></select><br><br><input id=sbutmac type=submit value='Execute'></input></form>";

?>

Do you recognize any new encryption pattern with this option’s value? Yes, it is the …

base64 encoded

… version of …


echo '564+98765' | bc

… as a macOS Terminal application command line way to add 564 + 98765 via the macOS bc command, we got wind of via …


<html>
<body>
<script type=text/javascript>
var x=prompt('' + window.btoa(" echo '564+98765' | bc"), '' + window.btoa(" echo '564+98765' | bc"));
</script>
</body>
</html>

… and please be assured if one of your own dropdown option entry values contains a + character you do not have to do the work above (unless you are a masochist, that is), rather the web application can help you out.

Which begs the question …

If window.btoa is the “Fred” of the Javascript side of the work, what is the PHP receiving side’s “Ginger”?

Well, yes, would that be base64_decode pray tell?!

<?php

$plusin='+';
$plusout=' ';

$fromsc='~/Desktop/test_gvp.scpt';
$tosc='~/Desktop/test_gvp.scpt';

function oururldecode($ofwhat) {
global $plusin, $plusout, $fromsc, $tosc;
$interim=str_replace($fromsc,$tosc,urldecode($ofwhat));
if (strpos($interim, ' ') === false || substr(($interim . 'x'),0,1) == '+') {
$plusin=' ';
$plusout=' ';
return str_replace($fromsc,$tosc,base64_decode($ofwhat));
} else {
$plusin='+';
$plusout=' ';
}
return $interim;
}


if (isset($_GET['afteropen'])) {
if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
array_push($afteropens, str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0]))));
}
} else {
$afteropen=(trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))) == '' ? '' : ' ' . trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))));
$afteropens=[$afteropen];
}
}

?>

This offers a dynamic way to swap between the concepts, whose logic depends a bit on that first value character always being a space in this project. But that is so, and so this thinking helps a lot, and allows for that differentiation of + character meaning between (the rare) + operator (in mathematics) meaning and the + character PHP space character encryption meaning.

Today we’re also introducing an AppleScript interfacing option, and with the “say” option we now allow for command conjoining with the dropdown option value as long as the open directly follows on from the semicolon conjoining think it’s an operator!

And so, again, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below

Did you know?

Have you noticed in amongst the macOS open command values lots of ones starting with the switch …


-b

? Well, The macOS open command, thanks, told us …

You can specify just the name of an application or the full path, i.e. /Applications/Preview.app. If you need to be specific, you can also specify an application’s bundle identifier with -b com.apple.Preview.

… found out, we’ve been finding, successfully, via …

  1. in Finder right click the application of interest
  2. click Show Package Contents
  3. open the info.plist file in your favourite Text Editor
  4. look for …

    CFBundleIdentifier

    … within, for example, AppleScript’s info.plist …

    <key>CFBundleIdentifier</key>
    <string>com.apple.ScriptEditor2</string>

    … to come up with, for example …

    open -b com.apple.ScriptEditor2

    … as a way to open macOS application AppleScript (or Script Editor)


Previous relevant Local Operating System Menu Intranet Feel Options Tutorial is shown below.

Local Operating System Menu Intranet Feel Options Tutorial

Local Operating System Menu Intranet Feel Options Tutorial

A static list of options in the functional dropdown, as with yesterday’s Local Operating System Menu Intranet Feel Windows Tutorial does not sound as much fun as …

  • dropdown (ie. select element) options that if you right click bring up a means by which …
    1. existant option can be modified
    2. a new option can be added
    3. the option pointed at effectively nullified
    4. an option to remember for next time on that web browser when the web application is re-opened
    5. an option to forget the previous option’s work … it works! … we’ve already forgotten! … chortle, chortle

    … and we decided also, now that the user has some control over functionality, then …

  • offer email and/or SMS sharing including or excluding any option tinkering as described above
  • offer more Windows explorer.exe options thanks to https://www.geoffchappell.com/studies/windows/shell/explorer/cmdline.htm
  • offer the chance off an RJM Programming incarnation’s top MAMP/macOS/Windows dropdown (ie. select element, now showing with size attribute 3) right click chances to adjust Apache (eg. MAMP) port setting assumptions

And so, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Windows Tutorial is shown below.

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Yesterday’s Local Operating System Menu Intranet Feel Multiple Tutorial‘s smarts regarding dropdown multiple selections gets passed through to today’s …

Windows MAMP PHP 7.4.16

oh, oh “They’re mentioning version numbers … that can’t be good” … interfacing work.

And yes, it was a struggle, with this PHP version on MAMP disallowing …

  • file_put_contents … and, we would guess, file_get_contents …
  • exec or shell_exec or passthru or system
  • fopen writing to any *.bat

… and so, what we ended up with was an “as you login it starts” lookfor_extravaganza.bat we wrote that has less qualms with all these security matters happening in PHP, looking like lookfor_extravaganza.bat (where you could consider the timeout command rather than our ping means to introduce a sleep/wait) …


rem lookfor_extravaganza.bat
rem RJM Programming
rem November, 2025
rem Help out open_extravaganza.php on local Windows MAMP incarnation regarding no file_put_contents nor exec nor shell_exec allowed
rem Installed via ...
rem Win + R
rem shell:startup
rem ... copied into place via advice of ...
rem https://www.google.com/search?q=continuousnning+in+background+at+login&rlz=1C5OZZY_en&oq=continuousnning+in+background++at+login&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKABMgkIAhAhGAoYoAEyCQgDECEYChigAdIBCjc1MjA1ajBqMTWoAgCwAgA&sourceid=chrome&ie=UTF-8
@echo off
cd C:\MAMP\htdocs
echo y > c:\MAMP\htdocs\open_extravaganza.y
:top
if exist c:\MAMP\htdocs\open_extravaganza.bxt rename c:\MAMP\htdocs\open_extravaganza.bxt open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat call c:\MAMP\htdocs\open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat erase c:\MAMP\htdocs\open_extravaganza.bat < c:\MAMP\htdocs\open_extravaganza.y ping /w 5000 127.0.0.1 > NUL
goto top

… leaving the PHP to just arrange that c:\MAMP\htdocs\open_extravaganza.bxt gets written via fopen means. Did you read above about where to “plonk” a DOS *.bat so that it starts up on logging in, as per …

Win + R
shell:startup
… copied into place via advice of …

this great advice, thanks … being, perhaps, simpler than Task Schedular thoughts?!

No time to see what else explorer.exe File Explorer is capable of … that is for another day we’re thinking?!

Anyway, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Multiple Tutorial is shown below.

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Operator Tutorial

Local Operating System Menu Intranet Feel Operator Tutorial

Local Operating System Menu Intranet Feel Operator Tutorial

Further to yesterday’s Local Operating System Menu Intranet Feel Options Tutorial we broach the issue …

What happens when a delimiter character is the same as an operator character in amongst data sent via HTML form from one webpage to the next webpage?

We’re talking about the + character which can be …

  • a space encryption character used a lot when PHP is the receiving webpage’s language
  • an operator in mathematics, for addition

If the latter is the meaning of a + plus character within that form data sent out, how can we know it is not just a space character encrypted?

Excellent question, that we grapple with in different ways around here, all the time!

Today, as far as this goes, take a look at the value attribute of a new macOS dropdown option we introduced today …

<?php

$selstuff="<br><br><form onsubmit=\"formclickmode=0; document.body.style.cursor='pointer'; if (lastselo) { lastselo.style.cursor='pointer'; lastselo=null; } if (document.getElementById('opsel')) { if (document.getElementById('opsel').value.length > 0) { this.action=document.getElementById('opsel').value; } } return perhaps(true,this);\" id=myform method=GET action='./open_extravaganza.php'><select title='Right click can modify dropdown choices' style=background-color:yellow; size=18 id=mysel multiple name=afteropen onchange=\"if (this.value.length != 0) { if (1 == 1) { formclickmode=prg(1,event.target); } else { document.getElementById('sbutmac').click(); } } \"><option oncontextmenu=ocmopt(this); value=''>Select macOS open command type(s) below ...</option><option oncontextmenu=ocmopt(this); value=' -a Finder'>Finder</option><option oncontextmenu=ocmopt(this); value=' -a Preview'>Preview</option><option oncontextmenu=ocmopt(this); value=' -a TextEdit'>TextEdit</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceMemos'>Voice Memo</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.QuickTimePlayerX https://www.rjmprogramming.com.au/Windows/windows_step_recorder.mov'>QuickTime Player</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.VoiceOverUtility'>VoiceOver Utility</option><option oncontextmenu=ocmopt(this); value=' ~/Desktop/Screen\\ Shot\\ *.png'>Preview all screenshot files</option><option oncontextmenu=ocmopt(this); value=' -a Firefox https://www.rjmprogramming.com.au'>Firefox</option><option oncontextmenu=ocmopt(this); value=' -a Safari http://localhost:8888/macos_say_record.php?saythis=Welcome\\&voice=Karen\\&audioname=;open -a Safari http://localhost:8888/macos_say_record.php'>Safari interface attempt to say</option><option oncontextmenu=ocmopt(this); value=' -b com.apple.ScriptEditor2 ~/Desktop/test_gvp.scpt'>AppleScript example ready to Script->Run</option><option oncontextmenu=ocmopt(this); value=\"IGVjaG8gJzU2NCs5ODc2NScgfCBiYw==\">Add 564 to 98765</option><option oncontextmenu=ocmopt(this); value=' ~/Documents ~/Desktop ~/Downloads'>Open the D folders</option><option oncontextmenu=ocmopt(this); value=' https://google.com'>Google</option><option oncontextmenu=ocmopt(this); value=' https://wikipedia.org'>Wikipedia</option><option oncontextmenu=ocmopt(this); value=' https://www.rjmprogramming.com.au'>RJM Programming</option><option oncontextmenu=ocmopt(this); value='ls -l . | open -f'>Pipe folder listing into TextEdit</option><option oncontextmenu=ocmopt(this); value='x-man-page://open'>Show man page in Terminal</option></select><br><br><input id=sbutmac type=submit value='Execute'></input></form>";

?>

Do you recognize any new encryption pattern with this option’s value? Yes, it is the …

base64 encoded

… version of …


echo '564+98765' | bc

… as a macOS Terminal application command line way to add 564 + 98765 via the macOS bc command, we got wind of via …


<html>
<body>
<script type=text/javascript>
var x=prompt('' + window.btoa(" echo '564+98765' | bc"), '' + window.btoa(" echo '564+98765' | bc"));
</script>
</body>
</html>

… and please be assured if one of your own dropdown option entry values contains a + character you do not have to do the work above (unless you are a masochist, that is), rather the web application can help you out.

Which begs the question …

If window.btoa is the “Fred” of the Javascript side of the work, what is the PHP receiving side’s “Ginger”?

Well, yes, would that be base64_decode pray tell?!

<?php

$plusin='+';
$plusout=' ';

$fromsc='~/Desktop/test_gvp.scpt';
$tosc='~/Desktop/test_gvp.scpt';

function oururldecode($ofwhat) {
global $plusin, $plusout, $fromsc, $tosc;
$interim=str_replace($fromsc,$tosc,urldecode($ofwhat));
if (strpos($interim, ' ') === false || substr(($interim . 'x'),0,1) == '+') {
$plusin=' ';
$plusout=' ';
return str_replace($fromsc,$tosc,base64_decode($ofwhat));
} else {
$plusin='+';
$plusout=' ';
}
return $interim;
}


if (isset($_GET['afteropen'])) {
if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
array_push($afteropens, str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0]))));
}
} else {
$afteropen=(trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))) == '' ? '' : ' ' . trim(str_replace(' ',' ' . $plusin,str_replace($plusin,$plusout,oururldecode($_GET['afteropen'])))));
$afteropens=[$afteropen];
}
}

?>

This offers a dynamic way to swap between the concepts, whose logic depends a bit on that first value character always being a space in this project. But that is so, and so this thinking helps a lot, and allows for that differentiation of + character meaning between (the rare) + operator (in mathematics) meaning and the + character PHP space character encryption meaning.

Today we’re also introducing an AppleScript interfacing option, and with the “say” option we now allow for command conjoining with the dropdown option value as long as the open directly follows on from the semicolon conjoining think it’s an operator!

And so, again, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below

Did you know?

Have you noticed in amongst the macOS open command values lots of ones starting with the switch …


-b

? Well, The macOS open command, thanks, told us …

You can specify just the name of an application or the full path, i.e. /Applications/Preview.app. If you need to be specific, you can also specify an application’s bundle identifier with -b com.apple.Preview.

… found out, we’ve been finding, successfully, via …

  1. in Finder right click the application of interest
  2. click Show Package Contents
  3. open the info.plist file in your favourite Text Editor
  4. look for …

    CFBundleIdentifier

    … within, for example, AppleScript’s info.plist …

    <key>CFBundleIdentifier</key>
    <string>com.apple.ScriptEditor2</string>

    … to come up with, for example …

    open -b com.apple.ScriptEditor2

    … as a way to open macOS application AppleScript (or Script Editor)


Previous relevant Local Operating System Menu Intranet Feel Options Tutorial is shown below.

Local Operating System Menu Intranet Feel Options Tutorial

Local Operating System Menu Intranet Feel Options Tutorial

A static list of options in the functional dropdown, as with yesterday’s Local Operating System Menu Intranet Feel Windows Tutorial does not sound as much fun as …

  • dropdown (ie. select element) options that if you right click bring up a means by which …
    1. existant option can be modified
    2. a new option can be added
    3. the option pointed at effectively nullified
    4. an option to remember for next time on that web browser when the web application is re-opened
    5. an option to forget the previous option’s work … it works! … we’ve already forgotten! … chortle, chortle

    … and we decided also, now that the user has some control over functionality, then …

  • offer email and/or SMS sharing including or excluding any option tinkering as described above
  • offer more Windows explorer.exe options thanks to https://www.geoffchappell.com/studies/windows/shell/explorer/cmdline.htm
  • offer the chance off an RJM Programming incarnation’s top MAMP/macOS/Windows dropdown (ie. select element, now showing with size attribute 3) right click chances to adjust Apache (eg. MAMP) port setting assumptions

And so, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Windows Tutorial is shown below.

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Yesterday’s Local Operating System Menu Intranet Feel Multiple Tutorial‘s smarts regarding dropdown multiple selections gets passed through to today’s …

Windows MAMP PHP 7.4.16

oh, oh “They’re mentioning version numbers … that can’t be good” … interfacing work.

And yes, it was a struggle, with this PHP version on MAMP disallowing …

  • file_put_contents … and, we would guess, file_get_contents …
  • exec or shell_exec or passthru or system
  • fopen writing to any *.bat

… and so, what we ended up with was an “as you login it starts” lookfor_extravaganza.bat we wrote that has less qualms with all these security matters happening in PHP, looking like lookfor_extravaganza.bat (where you could consider the timeout command rather than our ping means to introduce a sleep/wait) …


rem lookfor_extravaganza.bat
rem RJM Programming
rem November, 2025
rem Help out open_extravaganza.php on local Windows MAMP incarnation regarding no file_put_contents nor exec nor shell_exec allowed
rem Installed via ...
rem Win + R
rem shell:startup
rem ... copied into place via advice of ...
rem https://www.google.com/search?q=continuousnning+in+background+at+login&rlz=1C5OZZY_en&oq=continuousnning+in+background++at+login&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKABMgkIAhAhGAoYoAEyCQgDECEYChigAdIBCjc1MjA1ajBqMTWoAgCwAgA&sourceid=chrome&ie=UTF-8
@echo off
cd C:\MAMP\htdocs
echo y > c:\MAMP\htdocs\open_extravaganza.y
:top
if exist c:\MAMP\htdocs\open_extravaganza.bxt rename c:\MAMP\htdocs\open_extravaganza.bxt open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat call c:\MAMP\htdocs\open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat erase c:\MAMP\htdocs\open_extravaganza.bat < c:\MAMP\htdocs\open_extravaganza.y ping /w 5000 127.0.0.1 > NUL
goto top

… leaving the PHP to just arrange that c:\MAMP\htdocs\open_extravaganza.bxt gets written via fopen means. Did you read above about where to “plonk” a DOS *.bat so that it starts up on logging in, as per …

Win + R
shell:startup
… copied into place via advice of …

this great advice, thanks … being, perhaps, simpler than Task Schedular thoughts?!

No time to see what else explorer.exe File Explorer is capable of … that is for another day we’re thinking?!

Anyway, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Multiple Tutorial is shown below.

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Options Tutorial

Local Operating System Menu Intranet Feel Options Tutorial

Local Operating System Menu Intranet Feel Options Tutorial

A static list of options in the functional dropdown, as with yesterday’s Local Operating System Menu Intranet Feel Windows Tutorial does not sound as much fun as …

  • dropdown (ie. select element) options that if you right click bring up a means by which …
    1. existant option can be modified
    2. a new option can be added
    3. the option pointed at effectively nullified
    4. an option to remember for next time on that web browser when the web application is re-opened
    5. an option to forget the previous option’s work … it works! … we’ve already forgotten! … chortle, chortle

    … and we decided also, now that the user has some control over functionality, then …

  • offer email and/or SMS sharing including or excluding any option tinkering as described above
  • offer more Windows explorer.exe options thanks to https://www.geoffchappell.com/studies/windows/shell/explorer/cmdline.htm
  • offer the chance off an RJM Programming incarnation’s top MAMP/macOS/Windows dropdown (ie. select element, now showing with size attribute 3) right click chances to adjust Apache (eg. MAMP) port setting assumptions

And so, perhaps, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Windows Tutorial is shown below.

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Yesterday’s Local Operating System Menu Intranet Feel Multiple Tutorial‘s smarts regarding dropdown multiple selections gets passed through to today’s …

Windows MAMP PHP 7.4.16

oh, oh “They’re mentioning version numbers … that can’t be good” … interfacing work.

And yes, it was a struggle, with this PHP version on MAMP disallowing …

  • file_put_contents … and, we would guess, file_get_contents …
  • exec or shell_exec or passthru or system
  • fopen writing to any *.bat

… and so, what we ended up with was an “as you login it starts” lookfor_extravaganza.bat we wrote that has less qualms with all these security matters happening in PHP, looking like lookfor_extravaganza.bat (where you could consider the timeout command rather than our ping means to introduce a sleep/wait) …


rem lookfor_extravaganza.bat
rem RJM Programming
rem November, 2025
rem Help out open_extravaganza.php on local Windows MAMP incarnation regarding no file_put_contents nor exec nor shell_exec allowed
rem Installed via ...
rem Win + R
rem shell:startup
rem ... copied into place via advice of ...
rem https://www.google.com/search?q=continuousnning+in+background+at+login&rlz=1C5OZZY_en&oq=continuousnning+in+background++at+login&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKABMgkIAhAhGAoYoAEyCQgDECEYChigAdIBCjc1MjA1ajBqMTWoAgCwAgA&sourceid=chrome&ie=UTF-8
@echo off
cd C:\MAMP\htdocs
echo y > c:\MAMP\htdocs\open_extravaganza.y
:top
if exist c:\MAMP\htdocs\open_extravaganza.bxt rename c:\MAMP\htdocs\open_extravaganza.bxt open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat call c:\MAMP\htdocs\open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat erase c:\MAMP\htdocs\open_extravaganza.bat < c:\MAMP\htdocs\open_extravaganza.y ping /w 5000 127.0.0.1 > NUL
goto top

… leaving the PHP to just arrange that c:\MAMP\htdocs\open_extravaganza.bxt gets written via fopen means. Did you read above about where to “plonk” a DOS *.bat so that it starts up on logging in, as per …

Win + R
shell:startup
… copied into place via advice of …

this great advice, thanks … being, perhaps, simpler than Task Schedular thoughts?!

No time to see what else explorer.exe File Explorer is capable of … that is for another day we’re thinking?!

Anyway, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Multiple Tutorial is shown below.

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Local Operating System Menu Intranet Feel Windows Tutorial

Yesterday’s Local Operating System Menu Intranet Feel Multiple Tutorial‘s smarts regarding dropdown multiple selections gets passed through to today’s …

Windows MAMP PHP 7.4.16

oh, oh “They’re mentioning version numbers … that can’t be good” … interfacing work.

And yes, it was a struggle, with this PHP version on MAMP disallowing …

  • file_put_contents … and, we would guess, file_get_contents …
  • exec or shell_exec or passthru or system
  • fopen writing to any *.bat

… and so, what we ended up with was an “as you login it starts” lookfor_extravaganza.bat we wrote that has less qualms with all these security matters happening in PHP, looking like lookfor_extravaganza.bat (where you could consider the timeout command rather than our ping means to introduce a sleep/wait) …


rem lookfor_extravaganza.bat
rem RJM Programming
rem November, 2025
rem Help out open_extravaganza.php on local Windows MAMP incarnation regarding no file_put_contents nor exec nor shell_exec allowed
rem Installed via ...
rem Win + R
rem shell:startup
rem ... copied into place via advice of ...
rem https://www.google.com/search?q=continuousnning+in+background+at+login&rlz=1C5OZZY_en&oq=continuousnning+in+background++at+login&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKABMgkIAhAhGAoYoAEyCQgDECEYChigAdIBCjc1MjA1ajBqMTWoAgCwAgA&sourceid=chrome&ie=UTF-8
@echo off
cd C:\MAMP\htdocs
echo y > c:\MAMP\htdocs\open_extravaganza.y
:top
if exist c:\MAMP\htdocs\open_extravaganza.bxt rename c:\MAMP\htdocs\open_extravaganza.bxt open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat call c:\MAMP\htdocs\open_extravaganza.bat
if exist c:\MAMP\htdocs\open_extravaganza.bat erase c:\MAMP\htdocs\open_extravaganza.bat < c:\MAMP\htdocs\open_extravaganza.y ping /w 5000 127.0.0.1 > NUL
goto top

… leaving the PHP to just arrange that c:\MAMP\htdocs\open_extravaganza.bxt gets written via fopen means. Did you read above about where to “plonk” a DOS *.bat so that it starts up on logging in, as per …

Win + R
shell:startup
… copied into place via advice of …

this great advice, thanks … being, perhaps, simpler than Task Schedular thoughts?!

No time to see what else explorer.exe File Explorer is capable of … that is for another day we’re thinking?!

Anyway, you may want to (re-)try download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Multiple Tutorial is shown below.

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Local Operating System Menu Intranet Feel Multiple Tutorial

Our normal tack regarding the method attribute to use on an HTML form element when the recipient webpage is written in PHP is …

  • preferably use method=POST … because so much more data can be handled that way … but today we’re …
  • preferring to use method=GET … for several reasons …
    1. we cannot see that the data will get too long for method=GET
    2. we’re allowing dropdown (ie. select element) multiple selection mode and we found it easier to handle data wise for the recipient to use method=GET with a PHP recipient $_SERVER[‘QUERY_STRING’] able to help better parse a method=GET MAMP style URL like …

      http://localhost:8888/open_extravaganza.php?afteropen=+https%3A%2F%2Fgoogle.com&afteropen=+https%3A%2F%2Fwikipedia.org&afteropen=+https%3A%2F%2Fwww.rjmprogramming.com.au

      … as per …
      <?php

      $afteropens=[];
      $thisone=1;

      if (isset($_GET['afteropen'])) {
      if (sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])) > 2) {
      for ($thisone=1; $thisone<sizeof(explode('afteropen=', '?' . $_SERVER['QUERY_STRING'])); $thisone++) {
      array_push($afteropens, str_replace('+',' ',urldecode(explode('#',explode('&',explode('afteropen=', $_SERVER['QUERY_STRING'])[$thisone])[0])[0])));
      }
      } else {
      $afteropen=(trim(str_replace('+',' ',urldecode($_GET['afteropen']))) == '' ? '' : ' ' . trim(str_replace('+',' ',urldecode($_GET['afteropen']))));
      $afteropens=[$afteropen];
      }
      }

      ?>
      … whereas method=POST loses those $_SERVER[‘QUERY_STRING’] possibilities
    3. there will be method=GET URLs anyway coming from the newly arranged RJM Programming origin form elements presented now if navigator.platform indicates your underlying operating system is either macOS or Windows (ie. it takes a punt on the form action localhost attribute defined pointing at a local web server (eg. MAMP) … where there is no harm done just trying)

And so, improving on yesterday’s Local Operating System Menu Intranet Feel Tutorial

  • the Execute button now means something … ie. you click it ahead of a 10 second allowance before the web application clicks it … allowing for …
  • multiple operating system actions off that dropdown list can be attempted in any one foray
  • the RJM Programming incarnation of it may show more functionality possibilities than it used to … all within the limitation of non-mobile platforms only

The advice, then, becomes download as open_extravaganza.php filename (changed this way) to MAMP’s Document Root folder/directory), and we think it is now less boring for macOS or Windows users to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows) or try it below


Previous relevant Local Operating System Menu Intranet Feel Tutorial is shown below.

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Local Operating System Menu Intranet Feel Tutorial

Because we are fortunate enough to have the great MAMP local Apache/PHP/MySql web server in our macOS MacBook Air programming life …

  • we have a great testing platform to go to before uploading any software to the public RJM Programming domain (quite often as a web application) there
  • it can be an “Intranet feeling” partner to our public RJM Programming domain

So, what do we mean by “Intranet feeling”? Well, have you ever been involved at a workplace that combined …

  • a public facing website on the Internet … but which had a …
  • members area for “office use only” that if you logged into would take you into a woooorrrrllllddd of procedures and advice and documentation and health and safety rules etcetera etcetera etcetera related to that company, the data of which is “not public” … well, that “not public” bit can sometimes be referred to as an Intranet

? Well … … … … (four holes in the ground)(make that 5 or 6) … we did/have. And we are awwwwwffffuuuulllllyyy fond of the concept. The thing is though, we are using that “non public” …

Intranet “feeling”

… interfacing to, by and large, offer new web application (quite often PHP) ideas because back at the MAMP local Apache/PHP/MySql local web server we have the freedom to install software not allowed when you host a public website (as well as macOS having some brilliantly unique command line commands such as “open” and “say” (for which we’d ask you to download to a macOS MAMP port 8888 Document Root folder the PHP macos_say_record.php) to offer) perhaps that little bit different to the usual Intranet usage (hence Nala‘s use of the word fillingsfeelings), unless you run the hosting company, that is … and that isn’t us … though if Nala wants to entertain a gentleman caller one of these days … well … what are we going to say?! Hmmmmm?!

Now, when we presented YouTube API Caller Radio Play Playlist Windows Local System Tutorial we threw down the gauntlet, Luna would say, venturing …

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!

The audacity, Nala?!

Well, we don’t want to involve ourselves in a “software war” here, but the “bedside better scrutiny” of the great https://scriptingosx.com/2017/02/the-macos-open-command/ advice has only enhanced respect for the macOS open command’s talents, which go far beyond just being able to open a URL from the macOS “Terminal application” command line in your default web browser.

How do we count the ways … Luna?!!!! See the compartmentalization and modularization at play (not the command) here, Dumboweb masterbugalugs?!

Anyway, we’re off and running on a new project with these themes. The first draft concentrates on ..

  1. macOS .. open … MAMP … but …
  2. Windows … explorer.exe … MAMP

… is there for the popcorn and beer nuts (best in that order) and as you can see below this new web application (best downloaded as open_extravaganza.php filename to MAMP’s Document Root folder/directory) is kind of boring to begin with interfacing to our public RJM Programming website (though if you have no Apache/PHP/MySql local web server, and want to install one, a right click on the dropdown below, for your non-mobile platform is a possibility for port 8888 on macOS and port 80 (ie. the default) on Windows)

If this was interesting you may be interested in this too.

Posted in eLearning, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

YouTube API Caller Radio Play Doctype Meta Tutorial

YouTube API Caller Radio Play Doctype Meta Tutorial

YouTube API Caller Radio Play Doctype Meta Tutorial

It took a session on this MacBook Air’s macOS Firefox web browser trying the Tabular Single Row Media Gallery web application to emphasise the importance of more consistency checking on …

  • doctype HTML tagdeclaration …

    <!DOCTYPE html>

    … and …
  • meta HTML display tagcharset attribute …

    <meta charset="UTF-8">

… existence in web applications we create, to the point that not having the second one defined was stopping proper webpage display on Firefox. Was this a portent of what is to come soon on more web browsers?!

Let’s look at the purpose of these two HTML tagthingos …

  • doctype HTML tagdeclaration

    All HTML documents must start with a declaration.

    The declaration is not an HTML tag. It is an “information” to the browser about what document type to expect.

    … and …

  • meta HTML display tagcharset attribute

    The charset attribute specifies the character encoding for the HTML document.

    The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!

Regarding the same web application as yesterday’s YouTube API Caller Radio Play Playlist Windows Local System Tutorial talked about, why not revisit the tweaked swipe_media.html Tabular Single Row Media Gallery web application?


Previous relevant YouTube API Caller Radio Play Playlist Windows Local System Tutorial is shown below.

YouTube API Caller Radio Play Playlist Windows Local System Tutorial

YouTube API Caller Radio Play Playlist Windows Local System Tutorial

Further to the recent YouTube API Caller Radio Play Playlist Local System Tutorial macOS local system discussion, today, we code for …

play

… to mean something on the …

Windows

… “cmd” command accessible …

command line

What’s the scripting here? They are called batch files with extension *.bat we’re calling play.bat (going back to the DOS days of the ’70’s again). With *.bat you just need to plonk your play.bat anywhere within the Windows local system path, and the word (now command) “play” will do the rest anywhere in that user’s command line environment. And the batch file has …


@echo off
rem play.bat
rem RJM Programming
rem November, 2025

set passed=
set rest=

if trick==trick%1 (
set /p ans=Radio Play via comma separate YouTube 11 character IDs or search ideas for a playlist ... egs. Tragedy,Boogie Wonderland,Down Among the Dead Men ... random ... Tragedy ,Imagine*3,Breezin ... ordered 5 ... Tragedy ,Pina Colada Son,Fast Car ... audio ... Tragedy ,Galveston,Fix You ... audio ordered, and go.
) else (
set ans="%1"
set passed=yes
if trick==trick%2 goto :loop
set ans="%ans%,%2"
if trick==trick%3 goto :loop
set ans="%ans%,%3"
if trick==trick%4 goto :loop
set ans="%ans%,%4"
if trick==trick%5 goto :loop
set ans="%ans%,%5"
if trick==trick%6 goto :loop
set ans="%ans%,%6"
if trick==trick%7 goto :loop
set ans="%ans%,%7"
if trick==trick%8 goto :loop
set ans="%ans%,%8"
if trick==trick%9 goto :loop
set ans="%ans%,%9"
explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans:"=%"
:loop
if "%9"=="" (
@echo off
) else (
shift
set rest="%rest%,%9"
goto :loop
)
set ans="%ans%%rest%"
set ans=%ans:"=%
explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans%"
)
if trick==trick%passed% (
set ans=%ans:"=%
if "%ans:,=%"=="%ans%" (
echo "Nothing to do."
) else (
explorer.exe "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html %ans%"
)
)
rem exit
:end

… as your starting gambit, here, where the equivalent of macOS’s “open” is “explorer.exe” on Windows (ie. the File Explorer) … almost as cute!


Previous relevant YouTube API Caller Radio Play Playlist Local System Tutorial is shown below.

YouTube API Caller Radio Play Playlist Local System Tutorial

YouTube API Caller Radio Play Playlist Local System Tutorial

The ..

command line

… of a laptop or notebook or personal computer can be an environment to relax from the GUI aspects of your modern operating systems and think about …

  • processes
  • batch driven tasks
  • task simplifications

… and in the category of that last one, on our local macOS operating system we envisaged a day we could slip back to the “quiet world” of the “command line” and type a command like …


play Tragedy,Imagine,Down Among the Dead Men PAN -

… and get somewhere playing those songs through a web browser accessing the YouTube API and our interfacings to it in webpage software form, playing in a continuous Radio Play style.

You see, with all the distractions, only having to remember …

play

… no matter where we were in “command line” woooorrrrllllddd seemed the ideal, and yes, it’s possible. However, we think explaining …


bash /Applications/MAMP/htdocs/play.ksh Tragedy,Imagine,Down Among the Dead Men PAN -

… is a necessary dividing line between two parts to the discussion. So what’s bash? It’s the shell we associate as your macOS default shell (we get to via the “out of the box” macOS desktop application called Terminal) … well, it used to be … anyway, the first line of (what started as play.ksh then play.sh and then eventually, just, play … as a filename that is) …


#!/bin/bash
rest=""
if [ -z "$1" ]; then
echo "Radio Play via comma separate YouTube 11 character IDs or search ideas for a playlist ... egs. Tragedy,Boogie Wonderland,Down Among the Dead Men ... random ... Tragedy ,Imagine*3,Breezin ... ordered 5 ... Tragedy ,Pina Colada Song,Fast Car ... audio ... Tragedy ,Galveston,Fix You ... audio ordered, and go."
read ans
else
ans="$1 $2 $3 $4 $5 $6 $7 $8 $9"
while [ ! -z "$9" ]; do
shift
rest="${rest} $9"
done
ans="$ans${rest}"
fi
if [ ! -z "$ans" ]; then
open "https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html $ans"
fi
exit

… tells the local system use the bash shell to interpret this what you might like to think of as an executable script (which we went chmod 777 play regarding to make it so).

Okay, so we wrote this script in /Applications/MAMP/htdocs/ and that …


bash /Applications/MAMP/htdocs/play Tragedy,Imagine,Down Among the Dead Men PAN -

… could swing it at this stage, or even being in /Applications/MAMP/htdocs/ and going …


./play Tragedy,Imagine,Down Among the Dead Men PAN -

… but (even in /Applications/MAMP/htdocs/) …


play Tragedy,Imagine,Down Among the Dead Men PAN -

… is most likely to reply something like …

zsh: no such command

As the programmer, perhaps you could leave it at that with your “insider knowledge”, or if “play” as a command already meant something (a test that would be good to do before any such proposed work), otherwise … do you really think you’ll remember next Wednesday? So …

  1. enter into the wooooorrrrllllddd of aliases (thanks to this great advice, thanks) … eg.

    alias play="/Applications/MAMP/htdocs/play"
  2. placed into …

    ~/.bashrc

    … via (in our case) …

    vi ~/.bashrc
  3. then …

    source ~/.bashrc

    … needs to be included into the login procedure of …

    ~/.profile

    …via (in our case) …

    vi ~/.profile
  4. to make …

    play

    … as the interactively asking alternative to the argumentative example of …

    play Tragedy,Imagine,Down Among the Dead Men PAN -

    … mean something … and anywhere

    … all of this possible because of the brilliantly useful macOS (not Linux nor unix) …


    open

    … opener of web browsers from the command line blowing of our tiny little rather still naive mind … mind you, VAX/VMS “phone” command from the ’70’s might have even been better?! And then there were those punch cards … in the hopper … and if you got a character wrong … back to the end of the queue.

    Sorry … we got a bit hot and bothered there!

    Anyway, as a layer of thought on top of the recent YouTube API Caller Radio Play Playlist Songname Search List Repeats Tutorial‘s mildly changed swipe_media.html Tabular Single Row Media Gallery web application work it might be a thing you want to pursue yourself?

    By the way, this brought into play for us what your default web browser is. Ours is Safari yet we develop more on Google Chrome. Safari, for us, does more Popup Blocking, and it is a thing to look out for should a window not open when expected (and these command line methodologies don’t get past you still having to unmute and/or click/tap once before the Radio Play mode of play kicks off). To undo the Popup Block there will probably be a means to do this to the right of the web browser address bar.


    Previous relevant YouTube API Caller Radio Play Playlist Songname Search List Repeats Tutorial is shown below.

    YouTube API Caller Radio Play Playlist Songname Search List Repeats Tutorial

    YouTube API Caller Radio Play Playlist Songname Search List Repeats Tutorial

    Burp …

    Sorry to open with a quote, and sorry to repeat myself, like.

    And sorry to repeat myself, like, again.

    But there is a point. Today represents an improvement on yesterday’s arrangements for dynamic playlist creation regarding our Tabular Single Row Media Gallery web application via the playlist emoji button 🔀 click/tap or on the web browser command line. With yesterday’s scenario, had you entered as your internal playlist comma separated string …

    Born to Run,Born to Run,Born to Run,Born to Run

    … without the …

    Burp …

    that is you’d have ended up with the top find off a YouTube search repeated 4 times. Is this ideal? We asked Nala and Luna but, unfortunately they were busy, so they left me with the decision, and we came up with …

    That’s kind of silly.

    For these few reasons …

    • variety
    • album style Radio Play listening possibilities
    • perhaps getting around that …

      This video requires payment to watch YouTube

      … issue we talked about before … because you could uncheck it’s checkbox if the error appears

    • giving non-top search items a go

    … we decided to “mix it up” regarding entries like …

    Born to Run,Born to Run,Born to Run,Born to Run

    … as well as the simpler …

    Born to Run*4

    … so that repeats don’t cause users indigestion … chortle, chortle.

    Here’s the Javascript turning Born to Run*4 into Born to Run,Born to Run,Born to Run,Born to Run


    function expandrepeats(ocsl) {
    var numnum=0, minone=-1, interesting='', ninteresting='', pinteresting='', superinteresting='', imn=1;
    var retocsl=ocsl;
    var acarr=ocsl.split(',');
    for (var iac=0; iac<acarr.length; iac++) {
    numnum=0;
    minone=-1;
    if (acarr[iac].trim() != '') {
    if (acarr[iac].trim().slice(-1) >= '0' && acarr[iac].trim().slice(-1) <= '9') {
    while (('S' + acarr[iac].trim()).slice(minone).substring(0,1) >= '0' && ('S' + acarr[iac].trim()).slice(minone).substring(0,1) <= '9') {
    numnum++;
    minone--;
    }
    }
    if (numnum > 0 && numnum < eval('' + acarr[iac].trim().length)) {
    ninteresting=acarr[iac].trim().slice(-numnum);
    interesting=acarr[iac].trim().substring(0, eval(-numnum + eval('' + acarr[iac].trim().length)));
    superinteresting='';
    pinteresting='';
    if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\ x\ $/g,'')) {
    pinteresting=interesting.slice(-3) + ninteresting;
    superinteresting=interesting.replace(/\ x\ $/g,'').replace(/\ X\ $/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/x\ $/g,'')) {
    pinteresting=interesting.slice(-2) + ninteresting;
    superinteresting=interesting.replace(/x\ $/g,'').replace(/X\ $/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\ x$/g,'')) {
    pinteresting=interesting.slice(-2) + ninteresting;
    superinteresting=interesting.replace(/\ x$/g,'').replace(/\ X$/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/x$/g,'')) {
    pinteresting=interesting.slice(-1) + ninteresting;
    superinteresting=interesting.replace(/x$/g,'').replace(/X$/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\ \*\ $/g,'')) {
    pinteresting=interesting.slice(-3) + ninteresting;
    superinteresting=interesting.replace(/\ \*\ $/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\*\ $/g,'')) {
    pinteresting=interesting.slice(-2) + ninteresting;
    superinteresting=interesting.replace(/\*\ $/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\ \*$/g,'')) {
    pinteresting=interesting.slice(-2) + ninteresting;
    superinteresting=interesting.replace(/\ \*$/g,'');
    } else if (interesting.toLowerCase() != interesting.toLowerCase().replace(/\*$/g,'')) {
    pinteresting=interesting.slice(-1) + ninteresting;
    superinteresting=interesting.replace(/\*$/g,'');
    }
    if (superinteresting != '' && eval('' + ninteresting) >= 1) {
    for (imn=1; imn<=eval('' + ninteresting); imn++) {
    if (imn == 1) {
    retocsl=retocsl.replace(pinteresting, '');
    acarr[iac]=acarr[iac].replace(pinteresting, '');
    } else {
    retocsl=retocsl.replace(acarr[iac], acarr[iac] + ',' + superinteresting.trim());
    }
    }
    }
    }
    }
    }
    if (retocsl != ocsl) { outplist=retocsl; }
    return retocsl;
    }

    … in the changed swipe_media.html Tabular Single Row Media Gallery web application you can try for yourself (or try some more of The Boss), further to yesterday’s YouTube API Caller Radio Play Playlist Songname Search List Address Bar Tutorial.


    Previous relevant YouTube API Caller Radio Play Playlist Songname Search List Address Bar Tutorial is shown below.

    YouTube API Caller Radio Play Playlist Songname Search List Address Bar Tutorial

    YouTube API Caller Radio Play Playlist Songname Search List Address Bar Tutorial

    Don’t know if you are like me, but especially when on this MacBook Air we’re, forever, using a web browser address bar to type in, what we’ve set up as, a Google search engine webpage query. Rather than even going to Google webpage first, that is!

    Most people don’t want to know about arcane web application argument arrangements … though we’re very fond of the 5 minute ones?!

    What’s wrong with some of you? Who would not relish the thought of …

    • adding onto the address bar …

      https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html

      … with new arguments( eg. https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html Born to Run,Jungleland ) …
    • ?ask=y # will get you straight to the Javascript playlist prompt window
    • &or?thelist=[commaSeparatedList_encodeURIComponent_ized] # will supply that prompt window with the answer [commaSeparatedList_decodeURIComponent_ized]
    • &or?andgo=y # will click the Radio button after all above (unless notgo is mentioned in the list somewhere), as relevant, with the programmatically determined derived YouTube ID list via YouTube search(es)
    • 💬🦆 Come On!
    • … when, after a bit of thought and tweaks to our RJM Programming domain’s Apache Document Root residing 404.shtml webpage Javascript …

      if (document.URL.indexOf('rjmprogramming.com.au/HTMLCSS/swipe_media.htm') != -1) {
      if (decodeURIComponent(document.URL).indexOf(',') != -1) {
      if (decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).toLowerCase().indexOf('notgo') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?thelist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace('notgo','').replace('NOTGO','').replace('Notgo','')));
      } else {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?andgo=y&thelist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'')));
      exit;
      }
      } else if (decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).toLowerCase().indexOf('ask') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?ask=y';
      exit;
      }
      }

      … now all you need to add after that link above, on the web browser address bar is …

      [commaSeparatedList_decodeURIComponent_ized]

      … ie. just type a comma separated YouTube song search basis link after the link wording above
    • so 💬🦆 Come On down ye doubting Thomases!

    And so, further to yesterday’s YouTube API Caller Radio Play Playlist Songname Search List Dropdown Tutorial we have a changed swipe_media.html Tabular Single Row Media Gallery web application you can try for yourself.

    Stop Press

    On reflection, as well as …

    https://www.rjmprogramming.com.au/HTMLCSS/swipe_media.html Born to Run,Jungleland working up at the address bar, so, too, will https://www.rjmprogramming.com.au/ Born to Run,Jungleland


    Previous relevant YouTube API Caller Radio Play Playlist Songname Search List Dropdown Tutorial is shown below.

    YouTube API Caller Radio Play Playlist Songname Search List Dropdown Tutorial

    YouTube API Caller Radio Play Playlist Songname Search List Dropdown Tutorial

    Around here, regarding web application work, we really like dropdown (ie. HTML select element) work because a lot of information can be …

    • stored
    • displayed (often taking up minimal webpage space)
    • it’s option subelements can have an event life of their own, or be part of the select element event whole picture
    • dropdown multiple selection mode (as with today’s work) can …
      1. still support your single choice scenario
      2. we’ve coded today’s dropdown to support, as applicable, ordered single click choices … versus …
      3. can allow for control key (sets of choices not necessarily adjacent) and shift key (blocks of choices)
      4. can respond (as with today’s dropdown) to preset selections established at creation via dropdown (ie. select) innerHTML option subelement selected attribute setting
    • dropdown events onmousedown and ontouchdown (as for today’s dropdown) and onclick can be harnessed ahead of an onchange event … and in today’s case can help unset any preset option subelement selected attribute setting(s)

    Just so flexible! Subelement option CSS styling can be less friendly, but even so, often background colouring is possible, and we do a bit of that with the work from yesterday’s YouTube API Caller Radio Play Playlist Songname Search List Tutorial and today’s better “shored up” work you can see a bit of below (where your starting point might be that we “wrap” this particular Javascript prompt window through the Javascript overprompt function below) …


    var outplist='', kaconto=null, kacontoarr=[], rconeis=155, gconeis=255, bconeis=255;

    function overprompt(blb, defvl) {
    var tdsare=[], itdone=false, itds=0, baeis='', ivb=0, lastpassesmustard=true;
    var oklast=['A','E','I','M','Q','U','Y','c','g','k','o','s','w','0','4','8'];
    outplist=prompt(blb, defvl);
    if (outplist) {
    //alert(1);
    var outparrs=outplist.trim().split(',');
    //alert(11);
    if (eval('' + outparrs.length) > 1) {
    if (eval('' + outparrs[0].length) > 0) {
    if (oklast.indexOf(outparrs[0].slice(-1)) == -1) { lastpassesmustard=false; }
    }
    if ((outparrs[0] + baeis).replace(/\ \ \ $/g,'') != (outparrs[0] + baeis)) {
    baeis='&domatters=&20%20%20';
    outparrs[0]=outparrs[0].replace(/\ \ \ $/g,'');
    } else if ((outparrs[0] + baeis).replace(/\ \ $/g,'') != (outparrs[0] + baeis)) {
    baeis='&domatters=&20%20';
    outparrs[0]=outparrs[0].replace(/\ \ $/g,'');
    } else if ((outparrs[0] + baeis).replace(/\ $/g,'') != (outparrs[0] + baeis)) {
    baeis='&domatters=&20';
    outparrs[0]=outparrs[0].replace(/\ $/g,'');
    } else {
    baeis='';
    }
    //alert(111);
    if (eval('' + outparrs[0].length) != 11 || !lastpassesmustard || encodeURIComponent(outparrs[0]) != outparrs[0]) {
    //alert(1111);
    tdsare=document.getElementsByTagName('td');
    for (itds=0; itds<tdsare.length; itds++) {
    //alert(tdsare[itds].innerHTML);
    if (!itdone && tdsare[itds].innerHTML == '' && ('' + tdsare[itds].id) != 'td0001') {
    itdone=true;
    //alert('here ' + outplist.trim().replace(/\,/g,'|!!|'));
    //tdsare[itds].innerHTML='<iframe onload=karlook(this); style="width:100%;height:100%;" id=karsearch name=karsearch src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(outplist.trim().replace(/\,/g,'|!!|')) + '&minimize=y&youtube_duration=&email=&emoji=on&clickcheck=y"></iframe>';
    tdsare[itds].innerHTML='<iframe onload=karlook(this); style="width:100%;height:80%;" id=karsearch name=karsearch src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(outparrs[0]) + baeis + '&minimize=y&youtube_duration=&email=&emoji=on&clickcheck=y"></iframe>';
    tdsare[itds].scrollIntoView();
    //alert('there ' + outplist.trim().replace(/\,/g,'|!!|'));
    baeis='';
    kacontoarr=[];
    for (ivb=1; ivb<outparrs.length; ivb++) {
    kacontoarr.push(null);
    }
    for (ivb=1; ivb<outparrs.length; ivb++) {
    tdsare[eval(itds + ivb)].innerHTML='<iframe onload=karlookagain(this,' + eval(-1 + ivb) + '); style="width:100%;height:80%;visibility:hidden;" id=karsearch' + ivb + ' src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(outparrs[ivb]) + '&minimize=y&youtube_duration=&email=&emoji=on&clickcheck=y"></iframe>';
    }
    return '';
    }
    }
    }
    }
    }
    return outplist;
    }

    function karlook(iois) {
    var aconto=null;
    aconto = (iois.contentWindow || iois.contentDocument);
    if (aconto != null) {
    if (aconto.document) { aconto = aconto.document; }
    if (aconto.body != null) {
    if (outplist.indexOf(',') != -1) {
    kaconto=aconto;
    setTimeout(function(){ kaconto.getElementById('ajaxs').style.cursor='progress'; }, 3000);
    setTimeout(postkarlook, 7000);
    } else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
    kaconto=aconto;
    setTimeout(mpostkarlook, 7000);
    }
    }
    }
    }

    function karlookagain(iois,idxn) {
    var aconto=null;
    aconto = (iois.contentWindow || iois.contentDocument);
    if (aconto != null) {
    if (aconto.document) { aconto = aconto.document; }
    if (aconto.body != null) {
    if (eval('' + kacontoarr.length) > eval('' + idxn)) {
    kacontoarr[eval('' + idxn)]=aconto;
    } else {
    kacontoarr.push(aconto);
    }
    }
    }
    }

    function mpostkarlook() {
    if (kaconto.getElementById('ajaxs')) {
    var kbuts=kaconto.getElementsByTagName('input');
    for (var lbuts=0; lbuts<kbuts.length; lbuts++) {
    if (('' + kbuts[lbuts].type) == 'button') {
    if (('' + kbuts[lbuts].value).indexOf('Radio') == 0) {
    kbuts[lbuts].value=kbuts[lbuts].value.replace('Radio', String.fromCharCode(10) + 'Radio');
    }
    }
    }
    } else {
    setTimeout(mpostkarlook, 5000);
    }
    }

    function postkarlook() {
    var selectedones='', oktogo=true, hihi=0;
    if (kaconto.getElementById('ajaxs')) {
    //alert(kaconto.getElementById('ajaxs').innerHTML);
    for (hihi=0; hihi<kacontoarr.length; hihi++) {
    if (!kacontoarr[hihi]) {
    oktogo=false;
    //alert('hihi=' + hihi + ' NOT okay');
    } else if (!kacontoarr[hihi].getElementById('ajaxs')) {
    oktogo=false;
    //alert('hihi=' + hihi + ' not okay');
    }
    }
    if (!oktogo) {
    setTimeout(postkarlook, 5000);
    } else if (kaconto.getElementById('ajaxs').innerHTML.indexOf('... and then ...') == -1) {
    kaconto.getElementById('ajaxs').style.cursor='pointer';
    var otherps=baeisf();
    if (otherps != '' || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
    var kbuts=kaconto.getElementsByTagName('input');
    for (var lbuts=0; lbuts<kbuts.length; lbuts++) {
    if (('' + kbuts[lbuts].type) == 'button') {
    if (('' + kbuts[lbuts].value).indexOf('Radio') == 0) {
    var wasvl=kbuts[lbuts].value;
    if (otherps == ' ') {
    kbuts[lbuts].value=kbuts[lbuts].value.replace('Radio', 'Ordered ' + String.fromCharCode(10) + 'Audio ' + String.fromCharCode(10) + 'Radio');
    } else if (otherps == ' ') {
    kbuts[lbuts].value=kbuts[lbuts].value.replace('Radio', 'Audio ' + String.fromCharCode(10) + 'Radio');
    } else if (otherps == ' ') {
    kbuts[lbuts].value=kbuts[lbuts].value.replace('Radio', 'Ordered ' + String.fromCharCode(10) + 'Radio');
    } else {
    kbuts[lbuts].value=kbuts[lbuts].value.replace('Radio', String.fromCharCode(10) + 'Radio');
    }
    }
    }
    }
    }
    selectedones=(kaconto.getElementById('ajaxs').innerHTML.split(kaconto.getElementById('ajaxs').innerHTML.split('</option>')[0] + '</option>')[1].split('</option>')[0] + '</option>').replace('>', ' class=uptop selected>');
    for (hihi=0; hihi<kacontoarr.length; hihi++) {
    if (rconeis == gconeis && rconeis == bconeis) {
    bconeis-=7;
    if (bconeis < 0) { bconeis+=255; }
    } else if (rconeis == gconeis) {
    gconeis-=7;
    if (gconeis < 0) { gconeis+=255; }
    } else {
    rconeis-=7;
    if (rconeis < 0) { rconeis+=255; }
    }
    selectedones+=((kacontoarr[hihi].getElementById('ajaxs').innerHTML.split(kacontoarr[hihi].getElementById('ajaxs').innerHTML.split('</option>')[0] + '</option>')[1].split('</option>')[0] + '</option>').replace('>', ' class=uptop selected>')).replace(/option\ onclick\=/g, 'option style=background-color:rgb(' + rconeis + ',' + gconeis + ',' + bconeis + '); onclick=');
    kaconto.getElementById('ajaxs').innerHTML+='<option value="">... and then ...</option>';
    kaconto.getElementById('ajaxs').innerHTML+=kacontoarr[hihi].getElementById('ajaxs').innerHTML.split(kacontoarr[hihi].getElementById('ajaxs').innerHTML.split('</option>')[0] + '</option>')[1].replace(/option\ onclick\=/g, 'option style=background-color:rgb(' + rconeis + ',' + gconeis + ',' + bconeis + '); onclick=');
    //alert(kacontoarr[hihi].getElementById('ajaxs').innerHTML);
    }
    //alert(selectedones);
    kaconto.getElementById('ajaxs').innerHTML=kaconto.getElementById('ajaxs').innerHTML.replace(kaconto.getElementById('ajaxs').innerHTML.split('</option>')[0] + '</option>', kaconto.getElementById('ajaxs').innerHTML.split('</option>')[0] + '</option>' + selectedones + (selectedones != '' ? '<option id=optclk value="">____ Selection above available (resettable via click here) as you click/tap button at right ____</option>' : ''));
    if (selectedones != '') {
    kaconto.getElementById('ajaxs').onmousedown=function(event){ if (event.target.parentNode.outerHTML.split('>')[0].indexOf(' data-flagged=') == -1) { event.target.parentNode.setAttribute('data-flagged','y'); event.target.parentNode.innerHTML=event.target.parentNode.innerHTML.replace(/\ selected/g, ' ').replace('____ Selection above available (resettable via click here) as you click/tap button at right ____','____ Please select choices in usual multiple choice dropdown ways ____'); } };
    kaconto.getElementById('ajaxs').ontouchdown=function(event){ if (event.target.parentNode.outerHTML.split('>')[0].indexOf(' data-flagged=') == -1) { event.target.parentNode.setAttribute('data-flagged','y'); event.target.parentNode.innerHTML=event.target.parentNode.innerHTML.replace(/\ selected/g, ' ').replace('____ Selection above available (resettable via click here) as you click/tap button at right ____','____ Please select choices in usual multiple choice dropdown ways ____'); } };
    }
    }
    }
    }

    function baeisf() {
    var outarrp=outplist.split(',');
    if (eval('' + outarrp.length) > 1) {
    return outarrp[0].replace(outarrp[0].trim(), '');
    }
    return '';
    }

    And so, today …

    • we add onto the default random ordering mode of Radio Play via YouTube search comma separated list, the further choices ordered or audio or audio ordered, as per the relevant Javascript prompt blurb that is now going …

      Enter YouTube 11 character code video (comma separated) or audio stream only of video (semicolon) list to Radio Play (and add ! to start in shuffle mode and/or # for the order you enter and/or & for whole list) … or a YouTube Search String basis for playlist via a Radio📻? button to activate, later. Comma separateds can be search ideas … egs. Tragedy,Boogie Wonderland,Down Among the Dead Men … random … Tragedy ,Imagine,Breezin … ordered … Tragedy  ,Pina Colada Song,Fast Car … audio … Tragedy   ,Galveston,Angel of the Morning … audio ordered. Double click on this cell for playlist redefinitions.

    • started allowing for dropdown events onmousedown and ontouchdown be able to reset the preset choices we programmatically select for the user should they be happy (but our motivation for this event work was the potential to run into a YouTube video that gives the error …

      This video requires payment to watch YouTube

      )

    Codewise, this involved …

    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.


    If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment