Play swf files on windows 10 keygen#
The Firefox version of the script will always delete the file after 20 seconds. (May need to be adjusted for slower computers). It will now give the browser 1 second to launch before running the rest of the script. If you think it is likely your firefox browser will be closed when you run the command, replace the line with this: firefox about:config & sleep 1 & wmctrl -xa firefox & sleep 0.2 & xdotool key Return & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & firefox "$html" & firefox about:config & wmctrl -xa firefox & sleep 0.2 & xdotool key Return & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & sleep 20 & rm "$html" The browser needs to be open before the command is run. The reason for this is that for firefox to play local swf files this way you need to disable plugins.http_https_only in about:config, the script automatically disables it, opens the flash file, then re-enables it, because this is a setting most people will generally want to keep enabled. The Firefox version was a bit trickier, it requires wmctrl and xdotool to be installed. (Keep in mind that there may be a few corner cases where the html file is not deleted though, when this happens you can safely ignore it.) For Firefox Users: With this set, you can configure SWF files to open with the script, and the process is now fully automated so that you can open SWF files directly, without ever worrying about creating (or deleting) the html files by hand, in other words, it will behave like it should now. If there is no existing instance of your browser, the file will instead be deleted 20 seconds after the browser is closed. If there is an existing instance of your browser running, it will delete the html file in 20 seconds (giving you ample time to tell the browser to open the file with it's flash plugin). The script will now open the html file in your browser as soon as it has been created. #firefox about:config & wmctrl -xa firefox & sleep 0.2 & xdotool key Return & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & firefox "$html" & firefox about:config & wmctrl -xa firefox & sleep 0.2 & xdotool key Return & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & sleep 20 & rm "$html" To open swf files automatically in your browser and automate removal of the resulting html file after it has been used, uncomment one of the following lines at the bottom of the script (depending on your browser): #chromium "$html" & sleep 20 & rm "$html" swftohtml.sh filename 1.0.swf) If you want to fully automate the script: if you have filename1.0.swf and filename2.0.swf, it will default to filename2.0.swf)Īlternatively to target a specific swf file, you can enter the filename (or complete path to file) as an argument for the script and it will use that instead. If there are more than 1 swf files in the folder, it will default to the last one (e.g. The script when run with no arguments will look in the current folder for an swf file and make a corresponding html file that can be used to run this swf file in a browser. Remember to run chmod +x swftohtml.sh to make it executable. sh) at any location you desire, then to convert it into a runnable command either make an alias for it in bashrc, or copy it to /usr/bin/. To use the script, save it as swftohtml.sh(can be any name, does not have to end in. #firefox about:config & wmctrl -xa firefox & sleep 0.2 & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & firefox "$html" & firefox about:config & wmctrl -xa firefox & sleep 0.2 & xdotool type plugins.http & sleep 1 & xdotool key Tab & xdotool key Down & xdotool key Return & xdotool key Control+w & sleep 20 & rm "$html" #google-chrome "$html" & sleep 20 & rm "$html" #chromium "$html" & sleep 20 & rm "$html" (or in Firefox, go to about:plugins and see if it has "Shockwave Flash") #!/bin/bash For Linux users having this issue I have created the following script as a workaround:īefore proceeding, you must make sure that pepper-flash is installed for Chrome/Chromium, (flashplugin for Firefox) the only way to check (without using the workaround below that is) is to play a flash file on the internet.