Hacking urxvt scripts -- Perl help needed [FINISHED]
Before I start, I have no knowledge of Perl, and I'm finding it a fairly challenging language to read.
I have one last thing that I want for urxvt to make it just right. I'd like to be able to select some text from the terminal, and launch a search in a browser using only the mouse. I started with the first example in the urxvtperl man pages:
sub on_sel_grab {
warn "you selected ", $_[0]->selection;
I saved it to a file called 'grab' in my $HOME directory, and involked it with:
urxvt --perl-lib $HOME -pe grab
It works as it should; It echos whatever I highlight in the new terminal on the old terminal.
The next step was to make a basic launcher. I thought something like this would work:
sub on_sel_grab {
system("firefox http://www.google.com/search?q=", $_[0]->selection);
It doesn't, and other variations like '< $_[0]->selection' dont' work either. Static launchers do:
sub on_sel_grab {
system("firefox http://www.google.com/search?q=test");
For my first question, how do I get the value of $_[0]->selection appended to the search URL?
Last edited by skottish (2008-12-05 05:34:35)
Ok, first, add this line to the top of your script somewhere:
use URI::Escape;
It seems to be a standard module (I have it on my system by default). This will enable you to escape characters for URIs (yeah, I know the name is obvious).
Then update your sub as follows:
sub on_sel_grab {
# Load the selection into a variable, URI-escaping it first, so that the next command becomes clearer.
# "my" is just for the variable declaration so that you don't encounter any problems if you're using "strict"
my $selection = uri_escape($_[0]->selection);
# Add single quotes around the URI to avoid potential shell problems.
# The curly braces around the variable are just to be sure that it's read correctly.
# I don't think it's necessary here, but it's good practice when you're your variables aren't space-padded.
system("firefox 'http://www.google.com/search?q=${selection}');
# Is this necessary? Why is there here? I think you can remove this.
If you can't use "URI::Escape", you'll have to add several substitution lines (e.g. $selection =~ s/ /%20/g).
edit
I need to stop submitting replies that I've had open for 10 minutes.
edit 2
Try
pacman -S perl-libwww
I suspect that's the package providing the URI::Escape module.
Last edited by Xyne (2008-11-25 00:41:39)
Similar Messages
-
Calc script logic help needed urgently
Hello Gurus,
I am desiging a calc for Fringe Benefits account.
Longterm disability is calculated by multiplying cost pr employee per month ( constant hard coded number) with the % of Net Headcount
% of NetHEadcount is NetHeadCount(at lowest dept level)/Company Total Headcount(Highest Dept Level)
I have created accounts -- Netheadcount at lowest dept level
Is there a possibility that I calculate the %age of account level 0 to same account at highest level?
If not, please give me solution.
Also, I want to thank all the gurus that have helped me. Thanks to you...I am automated 90% of the process. THis is the last leg for this porject. My respect to all the gurus on Oracle FOrumsHi
Struggling a little to understand exactly what you need...are you just asking if you can calculate "%NetHeadCount" account, based on "Headcount" account at differing department levels?
If so then I guess you just need something along the lines of...(assuming your fix is on level 0 members of your department dim)
NetHeadCount% = Headcount / Headcount -> TotalDepartmentLevel;
JB -
Shell scripting urgent help needed
Hi all,
Please cany anyone advice asto why this section of the shell script (Solaris 10 > Oracle) doesnt work. The value e.g. 1.8.0.0 does get read in temp2.txt file but it does not compliy the if statement and runs @/u02/oradata/auto_exports/create_cc_config_backup.sql ? It ignores the entire IF statement. What's wrong?
echo "Backup of CC config, if exists"
echo "${USER}"
echo "${PASSWORD}"
echo "${ORACLE_SID}"
sqlplus -s ${USER}/${PASSWORD}@${ORACLE_SID} <<EOF>> /u02/oradata/auto_exports/a
rch_temp.txt
col PAR_VALUE format a15;
select 'xxxx', par_value from s_system_parameters where par_name='CC_VER';
exit;
EOF
cat /u02/oradata/auto_exports/arch_temp.txt | /bin/awk '$1 ~ /xxxx/ {print $2}'
/u02/oradata/auto_exports/arch_temp2.txtread CC_VERSION < /u02/oradata/auto_exports/arch_temp2.txt
if [ "$CC_VERSION" = '1.8.*' ] ; then
set echo on
sqlplus -s ${USER}/${PASSWORD}@${ORACLE_SID} <<EOF
@/u02/oradata/auto_exports/create_cc18xx_config_backup.sql
exit;
EOF
fi
if [ "$CC_VERSION" = '1.9.*' ] ; then
sqlplus -s ${USER}/${PASSWORD}@${ORACLE_SID} <<EOF
@/u02/oradata/auto_exports/create_cc_config_backup.sql
exit;
EOF
fi[159]: syntax error at line 167 : `fi' unexpected ???
read CC_VERSION < /u02/oradata/auto_exports/arch_temp2.txt
if [ `grep '^1.8' "$CC_VERSION" |wc -1` gt 0 ] then
set echo on
pause
sqlplus -s ${USER}/${PASSWORD}@${ORACLE_SID} <<EOF
@/u02/oradata/auto_exports/create_cc18xx_config_backup.sql
exit;
EOF
fi
if [ `grep '^1.9' "$CC_VERSION" |wc -1` gt 0 ] then
sqlplus -s ${USER}/${PASSWORD}@${ORACLE_SID} <<EOF
@/u02/oradata/auto_exports/create_cc_config_backup.sql
exit;
EOF
fi -
Rman hotbackup script log help needed
Hi I am trying this script to do a hot backup of the db. The db is 10g R2.
The script runs and does the backup. But the log file is not created and there is a file called rman_.log which is getting appended with
ps -ef | egrep pmon_$ORACLE_SID | grep -v grep
date +%d-%m-%y
Also I am unable to log the rman job. Can anyone advise what am I doing wrong. Thanks in advance.
# ~~~~~ set the variables ~~~~~ #
ORACLE_HOME=/u01/app/oraprd/product/10.2.0/db_1
ORACLE_BASE=/u01/app/oraprd
ORACLE_SID=testdb
DATE_TODAY='date +%d-%m-%y'
export ORACLE_HOME ORACLE_BASE ORACLE_SID
export DATE_TODAY
LOG_FILE=/scripts/rman_$ORACLE_SID_$DATE_TODAY_hot_bkp.log
export LOG_FILE
db_status="CLOSED"
# ~~~~~ Check if output file exists ~~~~~ #
if [ ! -e $LOG_FILE ] ; then
touch /scripts/rman_$ORACLE_SID_$DATE_TODAY_hot_bkp.log
chmod 755 /scripts/rman_$ORACLE_SID_$DATE_TODAY_hot_bkp.log
fi
# ~~~~~ Check status of database ~~~~~ #
pmon='ps -ef | egrep pmon_$ORACLE_SID | grep -v grep'
echo $pmon >> $LOG_FILE
echo $DATE_TODAY >> $LOG_FILE
if [ "$pmon" = "" ]; then
db_status="CLOSED"
echo "The db was closed; now starting to take backup" >> $LOG_FILE
else
db_status=sqlplus -s '/ as sysdba' <<EOF
startup;
exit
EOF
fi
if [ $db_status = "MOUNTED" -o $db_status = "OPEN" ]; then
echo "The db was open; now starting to take backup" >> $LOG_FILE
exit
EOF
fi
rman target / nocatalog log=$/scripts/rman_scripts/rman_${ORACLE_SID}_${DATE_TODAY}_hot_bkp.log <<EOF
run {
sql "alter system archive log current";
backup current controlfile;
backup database plus archivelog;
delete noprompt obsolete;
exit;
eofHi,
Now the script is logging but I am unable to run as a cron job.
$chmod 755 script
verfied the owner
$ crontab -l
00 02 * * * /scripts/rman_scripts/rman_prod_hot_bkp.sh >> /scripts/logs/rman_prod.hot_bkp.log 2>&1
but it does not work. when I
$ /scripts/rman_scripts/rman_prod_hot_bkp.sh
it works and the db is backed up. I know it is unix thing, but just can't seemt to figure out. Any ideas ???? -
Help need to script(urgent)
hai everybody...
i ahve written a javascript for popup a new
window...this is my script
script
function open()
if(portal40.wwctx_api.get_user=='JAYANTHAN')
window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQUIRY_REP.show?p_arg_names=_show_header&p_arg_values=YES&p_arg_names=_max_rows&p_arg_values=25&p_arg_names=_portal_max_row s&p_arg_values=25','new_page','width=1500,height=550,scrollbars=yes');
else
window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQ_REPORT.show?p_arg_names=_show_header&p_arg_values=YES&p_arg_names=_max_rows&p_arg_values=25&p_arg_names=_portal_max_rows &p_arg_values=25','new_page','width=1000,height=950,scrollbars=yes');
open();
but it doesn't open the new window...
for this i have created two reports,the above links are the report links...if it satisfy the condition then the first link lead to the
first report if not then second report
please help need ....
thansk in advance
leena
nullThis example will read and put the Authors name to the ESTK console and write the new details back to the document.
#target bridge
loadXMPLibrary();
var thumb = app.document.selections[0];
if(thumb.hasMetadata){
var selectedFile = thumb.spec;
var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
var myXmp = myXmpFile.getXMP();
var arrItem='';
var items = myXmp.countArrayItems(XMPConst.NS_DC, "creator");
for(var i = 1;i <= items;i++){
arrItem += myXmp.getArrayItem(XMPConst.NS_DC, "creator", i);
$.writeln(arrItem);
var Author = "This is my new Author";
myXmp.deleteProperty(XMPConst.NS_DC, "creator");
myXmp.appendArrayItem(XMPConst.NS_DC, "creator", Author, 0,XMPConst.ARRAY_IS_ORDERED);
if (myXmpFile.canPutXMP(myXmp)) {
myXmpFile.putXMP(myXmp);
myXmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
unloadXMPLibrary();
function loadXMPLib(){
if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
function unloadXMPLib(){
if( ExternalObject.AdobeXMPScript ) {
try{
ExternalObject.AdobeXMPScript.unload();
ExternalObject.AdobeXMPScript = undefined;
}catch (e){ } -
Hi
I need to create a script that will play back the name of the selected agent to the caller before being connected to the user. I have a simple queueing script setup ,just need the portion to play back the name
Any help will be appreciatedHi,
Play Prompt Step
Use the Play Prompt step to play back specified prompts to the caller.
Note :When any previous escalating prompt in the script enters the Play Prompt step, it is reset to the first
prompt in its list.
The customizer window of the Play Prompt step contains three tabs:
• General tab (Play Prompt step)
• Prompt tab (Play Prompt step)
• Input tab (Play Prompt step)
Prompt tab (Play Prompt step)
Use the Prompt tab of the Play Prompt customizer window to specify the prompt to be played back, and
to set the Barge In and Continue on Prompt Errors options.
Figure 2-99 1Play Prompt Customizer Window—Prompt Tab
Table 2-83 Play Prompt Properties—Prompt Tab
Properties / Buttons Description
Prompt Variable or expression indicating which prompt is to be played.
Please refer page 129 in the Cisco Unified Contact Center Express Editor Step Reference Guide,
http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/programming/guide/uccx851_step_ref.pdf
Hope it helps.
Anand
Please rate helpful posts !! -
Help needed : Extension manager cs6 not listing products
Help needed to Adobe extension manager cs6 to show all my cs6 products
I downloaded Extension manager from here Adobe - Exchange : Download the Adobe Extension Manager
My Computer windows xp 32bit
My Photosop version cs6
My Dreamweaver version cs6
I installed photoshop here : C:\Program Files\Adobe\Adobe Dreamweaver CS6
and my XManConfigfile
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<VariableForExMan>
<Data key="$sharedextensionfolder">$shareddatafolder/Adobe/Dreamweaver CS6/$LOCALE/Configuration/Extensions</Data>
<Data key="$dreamweaver">$installfolder</Data>
<Data key="$dreamweaver/Configuration">$userdatafolder/Adobe/Dreamweaver CS6/$LOCALE/Configuration</Data>
<Data key="$UserBinfolder">$userdatafolder/Adobe/Dreamweaver CS6/$LOCALE</Data>
<Data key="NeedOperationNotification">true</Data>
<Data key="QuitScript">dw.quitApplication()</Data>
<Data key="SupportedInSuite">CS6</Data>
<Data key="HostNameForCSXS">DRWV</Data>
<Data key="ProductVersion">12.0</Data>
<Data key="Bit">32</Data>
<Data key="DefaultLocale">en_US</Data>
</VariableForExMan>
</Configuration>
Extension manager installed here : C:\Program Files\Adobe\Adobe Extension Manager CS6
Photoshop Installed here: C:\Program Files\Adobe\Adobe Photoshop CS6
and my XManConfigfile
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<VariableForExMan>
<Data key="EmStorePath">$SharedRibsDataFolder/Adobe/Extension Manager</Data>
<Data key="$photoshopappfolder">$installfolder</Data>
<Data key="$pluginsfolder">$photoshopappfolder/Plug-Ins</Data>
<Data key="$presetsfolder">$photoshopappfolder/Presets</Data>
<Data key="$platform">Win</Data>
<Data key="$actions">$presetsfolder/Actions</Data>
<Data key="$blackandwhite">$presetsfolder/Black and White</Data>
<Data key="$brushes">$presetsfolder/Brushes</Data>
<Data key="$channelmixer">$presetsfolder/Channel Mixer</Data>
<Data key="$colorbooks">$presetsfolder/Color Books</Data>
<Data key="$colorrange">$presetsfolder/Color Range</Data>
<Data key="$colorswatches">$presetsfolder/Color Swatches</Data>
<Data key="$contours">$presetsfolder/Contours</Data>
<Data key="$curves">$presetsfolder/Curves</Data>
<Data key="$customshapes">$presetsfolder/Custom Shapes</Data>
<Data key="$duotones">$presetsfolder/Duotones</Data>
<Data key="$exposure">$presetsfolder/Exposure</Data>
<Data key="$gradients">$presetsfolder/Gradients</Data>
<Data key="$huesat">$presetsfolder/Hue Sat</Data>
<Data key="$imagestatistics">$presetsfolder/Image Statistics</Data>
<Data key="$keyboardshortcuts">$presetsfolder/Keyboard Shortcuts</Data>
<Data key="$layouts">$presetsfolder/Layouts</Data>
<Data key="$lenscorrection">$presetsfolder/Lens Correction</Data>
<Data key="$levels">$presetsfolder/Levels</Data>
<Data key="$liquifymeshes">$presetsfolder/Liquify Meshes</Data>
<Data key="$menucustomization">$presetsfolder/Menu Customization</Data>
<Data key="$optimizedcolors">$presetsfolder/Optimized Colors</Data>
<Data key="$optimizedoutputSettings">$presetsfolder/Optimized Output Settings</Data>
<Data key="$optimizedsettings">$presetsfolder/Optimized Settings</Data>
<Data key="$patterns">$presetsfolder/Patterns</Data>
<Data key="$reducenoise">$presetsfolder/Reduce Noise</Data>
<Data key="$replacecolor">$presetsfolder/Replace Color</Data>
<Data key="$scripts">$presetsfolder/Scripts</Data>
<Data key="$selectivecolor">$presetsfolder/Selective Color</Data>
<Data key="$shadowhighlight">$presetsfolder/Shadow Highlight</Data>
<Data key="$smartsharpen">$presetsfolder/Smart Sharpen</Data>
<Data key="$styles">$presetsfolder/Styles</Data>
<Data key="$textures">$presetsfolder/Textures</Data>
<Data key="$tools">$presetsfolder/Tools</Data>
<Data key="$variations">$presetsfolder/Variations</Data>
<Data key="$webphotogallery">$presetsfolder/Web Photo Gallery</Data>
<Data key="$workspaces">$presetsfolder/Workspaces</Data>
<Data key="$zoomify">$presetsfolder/Zoomify</Data>
<Data key="$hueandsaturation">$presetsfolder/Hue and Saturation</Data>
<Data key="$lights">$presetsfolder/Lights</Data>
<Data key="$materials">$presetsfolder/Materials</Data>
<Data key="$meshes">$presetsfolder/Meshes</Data>
<Data key="$rendersettings">$presetsfolder/Render Settings</Data>
<Data key="$volumes">$presetsfolder/Volumes</Data>
<Data key="$widgets">$presetsfolder/Widgets</Data>
<Data key="$localesfolder">$photoshopappfolder/Locales</Data>
<Data key="$additionalplugins">$localesfolder/$LOCALE/Additional Plug-ins</Data>
<Data key="$additionalpresets">$localesfolder/$LOCALE/Additional Presets</Data>
<Data key="$localeskeyboardshortcuts">$localesfolder/$LOCALE/Additional Presets/$platform/Keyboard Shortcuts</Data>
<Data key="$localesmenucustomization">$localesfolder/$LOCALE/Additional Presets/$platform/Menu Customization</Data>
<Data key="$localesworkspaces">$localesfolder/$LOCALE/Additional Presets/$platform/Workspaces</Data>
<Data key="$automate">$pluginsfolder/Automate</Data>
<Data key="$digimarc">$pluginsfolder/Digimarc</Data>
<Data key="$displacementmaps">$pluginsfolder/Displacement Maps</Data>
<Data key="$effects">$pluginsfolder/Effects</Data>
<Data key="$extensions">$pluginsfolder/Extensions</Data>
<Data key="$fileformats">$pluginsfolder/File Formats</Data>
<Data key="$filters">$pluginsfolder/Filters</Data>
<Data key="$imagestacks">$pluginsfolder/Image Stacks</Data>
<Data key="$importexport">$pluginsfolder/Import-Export</Data>
<Data key="$measurements">$pluginsfolder/Measurements</Data>
<Data key="$panels">$pluginsfolder/Panels</Data>
<Data key="$parser">$pluginsfolder/Parser</Data>
<Data key="$3dengines">$pluginsfolder/3D Engines</Data>
<Data key="$lightingstyles">$pluginsfolder/Filters/Lighting Styles</Data>
<Data key="$matlab">$photoshopappfolder/MATLAB</Data>
<Data key="UserExtensionFolder">$photoshopappfolder</Data>
<Data key="$photoshop">$UserDataFolder/Adobe/Adobe Photoshop CS6/Configuration</Data>
<Data key="DisplayName">Photoshop CS6 32</Data>
<Data key="ProductName">Photoshop32</Data>
<Data key="FamilyName">Photoshop</Data>
<Data key="ProductVersion">13.0</Data>
<Data key="IconPath">Configuration/PS_exman_24px.png</Data>
<Data key="SupportedInSuite">CS6</Data>
<Data key="HostNameForCSXS">PHSP</Data>
<Data key="Bit">32</Data>
</VariableForExMan>
</Configuration>
Please someone help me i cant install any photoshop extension because of this issue,,,Waiting for your reply ...thanks
Here is the results
I installed photoshopcs6 illustrator cs6 dreamweaver cs6 illustrator cs6 in the system , But nothing seems
Result: BridgeTalk Diagnostics
Info:
Name = estoolkit-3.8
Status = PUMPING
Path
Version = 2.0
Build = ES 4.2.12
Next serial number = 40
Logging: = OFF
Now = 15:55:49
Messages:
Message Version = 2.05
Authentication = ON
Digest = ON
Thread: estoolkit-3.8#thread
Avg. pump interval = 55ms
Last pump = 62ms ago
Ping: 7
ECHO_REQUEST: ECHO_RESPONSE
Timeout = undefined
Handler = undefined
STATUS: PUMPING
Timeout = undefined
Handler = undefined
MAIN: MAIN
Timeout = undefined
Handler = installed
LAUNCHED: LAUNCHED
Timeout = undefined
Handler = installed
DIAGNOSTICS: DIAGNOSTICS
Timeout = undefined
Handler = installed
INFO: INFO
Timeout = undefined
Handler = installed
SETUPTIME: thread=0ms, left=16ms
Timeout = undefined
Handler = undefined
Instances: 3
estoolkit-3.8#dbg:
msg[15:55:49]: 00000035
@BT>Version = 2.05
Target = estoolkit-3.8#dbg
Sender = estoolkit-3.8#dbg
Sender-ID = localhost:win3788
Timeout = 15:55:50
Type = Ignore
Response-Request = Timeout
Headers = (no headers)
Timestamp = 15:55:49
Serial-Number = 35
Received = undefined
Result = undefined
Error = undefined
Body = (empty)
Incoming: 1
Outgoing: 0
Handler: 9
ExtendScript = for all messages
Error = for only msg #25
Error = for only msg #27
Error = for only msg #31
Result = for only msg #35
Error = for only msg #35
Timeout = for only msg #35
Result = for only msg #37
Error = for only msg #37
estoolkit-3.8#estk:
msg[15:55:49]: 00000037
@BT>Version = 2.05
Target = estoolkit-3.8#estk
Sender = estoolkit-3.8#dbg
Sender-ID = localhost:win3788
Timeout = 16:05:49
Type = Debug
Response-Request = Result Error
Headers = (no headers)
Timestamp = 15:55:49
Serial-Number = 37
Received = undefined
Result = undefined
Error = undefined
Body: 107 bytes
Text = <get-properties engine="main" object="$.global" exclude="undefined,builtin,prototype" all="true" max="20"/>
Incoming: 1
Outgoing: 0
Handler: 1
ExtendScript = for all messages
estoolkit-3.8: (main)
Incoming: 0
Outgoing: 0
Handler: 1
ExtendScript = for all messages
Targets: 1
Connector = PCD
Installed: 0
Running: 0
exman-6.0:
Path = C:\Program Files\Adobe\Adobe Extension Manager CS6\Adobe Extension Manager CS6.exe
Display Name = Adobe Extension Manager CS6
MsgAuthentication = ON
MsgDigest = ON
ESTK = OFF
BundleID = com.adobe.exman
Status = (not running)
ExeName = Adobe Extension Manager CS6.exe
Installed: 1
Running: 0
Groups = (no groups defined) -
Urgent help needed on deployment facts
Hi
I had completed a Java Web based application using JApplet, which in turn uses Java Media Framework and Java Communications APIs. So when i deploy this application and let the clients use this application. I need to dump some jar files and properties files into the clients JRE so that all the APIs will work properly. Without any installations. I tried doing this manually by copying these files into client machines So is there a direct method for performing the task. Or i need to add some additional code to my applet so as to find the clients current JRE version and place the required files under using FTP? Can i write a setup routine or something which does all these operations once the client access the applet?
Help needed in the above issues
Thanks in advance
SwarajWhat you will want to do is look into JNLP and Java WebStart. They allow you to write a setup for your product that makes installation as easy as InstallShield™ does for the Windows™ platform (ie: it allows customers who cannot tell Java from Perl to install your product).
-
"Expected end of line, etc. but found end of script." HELP!!
When I try to run my script, it say "(null.)" When I try to compile it or save it as an application, it says "Expected end of line, etc. but found end of script." HELP!!!
Here is my script:
display dialog "WARNING! a virus has been detected and the system is crashing" buttons {"shut down computor to preserve contents", "burn virus file"} default button 2
if the button returned of the result is "burn virus file" then
say "warning the virus has reacted to its deletion and has activated itself"
say "virus is now in control of the users computor"
say "if you try to stop the virus it will delete all user data"
tell application "Safari"
activate
open location "http://www.facebook.com"
open location "http://www.yahoo.com"
open location "http://www.gmail.com"
open location "http://www.youtube.com"
end tell
tell application "iTunes"
activate
play
end tell
tell application "iCal"
activate
end tell
tell application "Terminal"
activate
end tell
tell application "Finder"
quit
end tell
if the button returned of the result is "shut down computor to preserve contents" then
say "your computor will shut to protect your files."
say "shut down in t-3"
say "2."
say "1."
say "goodbye"
say "it appears that there is a problem"
say "the virus is starting to take over your system"
beep 17
display dialog "how DARE you try to delete me. I am now going to take over your computer." buttons {"**** YOU GET OUTTA MY COMPUTER", "OK, have fun!!"} default button "OK, have fun!!"
if the button returned of the result is "OK, have fun!!" then
say "thank you!!"
say "watch this!"
Tell application "iChat"
quit
end tell
Tell application "Finder"
quit
end tell
if the button returned of the result is "**** YOU GET OUTTA MY COMPUTER" then
say "That attitude will not be tollerated."
say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"
display dialog "A virus has been detected going through your files. Would you like to try to stop this?" buttons {"OK"} default button "OK"
if the button returned of the result is "OK" then
beep 5
display dialog "there has been an error. Do you want to try to force quit?" buttons "Yes" default button "Yes"
if the button returned of the result is "Yes" then
say "Well, thats just too bad!"
beep 2
say "Sorry about that."
say "The virus has been purged from your system."
say "Your computer will now restart to make sure that all traces of the virus have been removed."
say "shut down in t-3"
say "2"
say "1"
say "goodbye"
tell application "Finder"
restart
end tell
end ifYou need to complete compound if statements with an end if - see the AppleScript Language Guide for a description of the various kinds of if statements.
Although I don't think it is going to do what you expect, your script would look something like:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into the AppleScript Editor">
display dialog "WARNING! a virus has been detected and the system is crashing" buttons {"shut down computor to preserve contents", "burn virus file"} default button 2
if the button returned of the result is "burn virus file" then
say "warning the virus has reacted to its deletion and has activated itself"
say "virus is now in control of the users computor"
say "if you try to stop the virus it will delete all user data"
tell application "Safari"
activate
open location "http://www.facebook.com"
open location "http://www.yahoo.com"
open location "http://www.gmail.com"
open location "http://www.youtube.com"
end tell
tell application "iTunes"
activate
play
end tell
tell application "iCal"
activate
end tell
tell application "Terminal"
activate
end tell
tell application "Finder"
quit
end tell
else if the button returned of the result is "shut down computor to preserve contents" then
say "your computor will shut to protect your files."
say "shut down in t-3"
say "2."
say "1."
say "goodbye"
say "it appears that there is a problem"
say "the virus is starting to take over your system"
beep 17
end if
display dialog "how DARE you try to delete me. I am now going to take over your computer." buttons {"**** YOU GET OUTTA MY COMPUTER", "OK, have fun!!"} default button "OK, have fun!!"
if the button returned of the result is "OK, have fun!!" then
say "thank you!!"
say "watch this!"
tell application "iChat"
quit
end tell
tell application "Finder"
quit
end tell
else if the button returned of the result is "**** YOU GET OUTTA MY COMPUTER" then
say "That attitude will not be tollerated."
say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"
end if
display dialog "A virus has been detected going through your files. Would you like to try to stop this?" buttons {"OK"} default button "OK"
if the button returned of the result is "OK" then
beep 5
display dialog "there has been an error. Do you want to try to force quit?" buttons "Yes" default button "Yes"
else if the button returned of the result is "Yes" then
say "Well, thats just too bad!"
beep 2
say "Sorry about that."
say "The virus has been purged from your system."
say "Your computer will now restart to make sure that all traces of the virus have been removed."
say "shut down in t-3"
say "2"
say "1"
say "goodbye"
tell application "Finder"
restart
end tell
end if
</pre> -
Help needed to resolve there is no attribute X errors..
On my website http://www.dorffdesign.nl/ there is a problem. Ive put the FB Like button there and it worked fine for a while. But now its gone. So ive run
http://validator.w3.org/ on it and came up with the next errors:
========================================================================================== ==============================================
Line 232, Column 32: there is no attribute "data-href" <div class="fb-like" data-href="http://www.dorffdesign.nl/" data-send="true" da… ✉
Line 232, Column 71: there is no attribute "data-send" …http://www.dorffdesign.nl/" data-send="true" data-width="450" data-show-faces=… ✉
Line 232, Column 89: there is no attribute "data-width" …orffdesign.nl/" data-send="true" data-width="450" data-show-faces="true"></div> ✉
Line 232, Column 111: there is no attribute "data-show-faces" …orffdesign.nl/" data-send="true" data-width="450" data-show-faces="true"></div>
========================================================================================== ===============================================
In dreamweaver ive use this code for the FB likke button:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/nl_NL/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
========================================================================================== ===========
<div class="fb-like" data-href="http://www.dorffdesign.nl/" data-send="true" data-width="450" data-show-faces="true"></div>
I really want to solve this so im hoping if you can point me into the right direction.
RegardsHi ive bin able to put the fb like button on my page. But i totally forgot how i have to place the fb like button under the black box named portfolio.
I hope you can tell me.
Regards
Date: Wed, 7 Nov 2012 07:41:54 -0700
From: [email protected]
To: [email protected]
Subject: Help needed to resolve there is no attribute X errors..
Re: Help needed to resolve there is no attribute X errors..
created by MurraySummers in Dreamweaver General - View the full discussion
You can either ignore those errors (since they have no impact on your page's functionality) or you can use DW to convert your page to an HTML5 doctype (File > Convert > HTML 5, and then the errors will go away.
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4829606#4829606
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4829606#4829606
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4829606#4829606. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Dreamweaver General by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
i forgot my apple password and i forgot the security q , and i think somebody hacks my email . please help!!!
this is it ([email protected])Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
A
1. iOS- Forgotten passcode or device disabled after entering wrong passcode
2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
3. Restoring iPod touch after forgotten passcode
4. What to Do If You've Forgotten Your iPhone's Passcode
5. iOS- Understanding passcodes
6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
7. iOS - Unable to update or restore
Forgotten Restrictions Passcode Help
iPad,iPod,iPod Touch Recovery Mode
You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
Also, see iTunes- Restoring iOS software.
Alternatives for Help Resetting Security Questions and Rescue Mail
1. Apple ID- All about Apple ID security questions.
2. Rescue email address and how to reset Apple ID security questions
3. Apple ID- Contacting Apple for help with Apple ID account security.
4. Fill out and submit this form. Select the topic, Account Security.
5. Call Apple Customer Service: Contacting Apple for support in your
country and ask to speak to Account Security.
How to Manage your Apple ID: Manage My Apple ID -
Java help needed-Inventory System
I urgently need help in finishing my java inventory project for school. Can anyone help me usin files and streams to get the program to save data and help me get the menu to work pls THANKS> Heres the source code below:
// TextForm.java
// A simple label/field form panel
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TextForm extends JPanel {
private JTextField[] fields;
// Create a form with the specified labels, tooltips, and sizes.
public TextForm(String[] labels,
int[] widths, String[] tips) {
super(new BorderLayout());
JPanel labelPanel = new JPanel(new GridLayout(labels.length, 1));
JPanel fieldPanel = new JPanel(new GridLayout(labels.length, 1));
add(labelPanel, BorderLayout.WEST);
add(fieldPanel, BorderLayout.CENTER);
fields = new JTextField[labels.length];
for (int i=0; i < labels.length; i+=1) {
fields[i] = new JTextField();
if (i < tips.length) fields.setToolTipText(tips[i]);
if (i < widths.length) fields[i].setColumns(widths[i]);
JLabel lab = new JLabel(labels[i], JLabel.RIGHT);
lab.setLabelFor(fields[i]);
labelPanel.add(lab);
JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
p.add(fields[i]);
fieldPanel.add(p);
JScrollBar JScrollBar = new JScrollBar();
JScrollBar vbar = new JScrollBar(JScrollBar.VERTICAL, 30, 40, 0, 300);
add(vbar, BorderLayout.EAST);
public String getText(int i) {
return( fields[i].getText() );
public static void main(String[] args) {
String[] labels = { "115ml Medicine", "236.60ml Water-clear", "236.60 Water-Amber", "250ml Irish Moss",
"250ml Sauce", "355ml Water", "380ml Juice", "473ml Vinegar", "500ml Water", "500 ml Blue Water", "600ml Water",
"750ml Syrup/honey", "900ml Disinfectant", "1000ml Syrup", "1500ml Water", "Total # caps:" };
int[] widths = { 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 ,12 };
String[] descs = { "", "Enter Quantity" };
final TextForm form = new TextForm(labels, widths, descs);
JButton submit = new JButton("Save Inventory");
JButton cancel = new JButton( "Cancel");
submit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showConfirmDialog(null,"Are you sure you want to save this record?");
JOptionPane.showMessageDialog(null, " Inventory status updated");
JOptionPane.showConfirmDialog(null, "Do you want to exit?");
JFrame f = new JFrame("Sweet Inventory System");
f.getContentPane().add(form, BorderLayout.NORTH);
JPanel p = new JPanel();
p.add(submit);
f.getContentPane().add(p, BorderLayout.CENTER);
f.pack();
f.setVisible(true);
Its error free except i cant see the menubar or get it to save items usin files and streams.
HELP PLEASETELL ME THE CODE I CAN USE TO MAKE IT SAVE ITEMS LIKE
IN A TEXT FILE AND HOW CAN I ATTACH IT TO THE SAVE
BUTTON USIN A LISTENER
THANKS
PLS POST HEREPosts like this make me ignore you forever. -
Help: Just finished shooting a wedding and Aperture crashes constantly during editing. All pic's in RAW and even after making sure I have the latest Aperture update, I have had to rebuild my library twice and "repair" does not seem to fix the issue. Help?
Well!
If you have ThunderBolt, I would go with such for an External Working Drive, spinning platter or SSD depending on your budget
This does not have to be huge just big enough to house your most current Jobs
Once the Current Job is put to rest I would move it to a larger multi bay hard drive unit, USB or FireWire nothing fancy, no RAID, set up as one single Disk
This would only be accessed when something is needed from a past Job so the connection does not have to be speedy
The Drobo would be relegated to Vaults and backups
You can set up a Vault on the Drobo to back up the External Working Library and then Reconnect it when you have moved the Library over to the other Enclosure
This has worked for me pretty smoothly for a long while, but I have found over the years that one can not assume all people work in the same manner! :-) -
Please help, need to use stems for final audio output
Hi, hoping somebody can help. Finished a editing a feature due tomorrow and the sound designer gave me a final stereo mix that's a half hour too short. But he also gave me the "stems" and said I could adjust them as if I knew anything about audio.
Here's the question, I have DX, FX, MX, ME and VO files. Don't know which are redundant. Can output myself if I know which ones to use. Please, if you know, share?
Thanks!Wow, if he knew anything about audio he would have given you the proper mix.
Try just putting each of those in separate tracks.
Make sure the line up by playing the master and listening for an echo. Then just start turning off the tracks until you get what you need. It certainly looks like some will have some internal redundancy. I don't understand all his terminology, but it's apparent that he has mixes that split out the voice tracks so you can drop in foreign language voices later. So the ME and VO sets will duplicate what's found in some of the others. -
I need a help to finish a project in flex.
The difficulty that I am taking are:
1) I have 2 images, one in jpeg thumbnail and other main vector for viewing receiving zoom.
Must reflect the movement of the mouse model of the main image, but it must obey the same area being traveled the thumbnail image in the main, like a magnifying glass, but reflecting their movements in a particular area, but in another image, principal.
2) must also be exactly the same area because of marked objects will be placed on the main image, and will then be stored and repurados the positions, ie the positions of objects markers accompany the zoom.
To have an better idea, see the prototype in: http://www.silvadeveloper.comoj.com
Any help will be welcome, if it is in code, better.
Regards,
Silva Developer
silva.developer @ gmail.com
www.silvadeveloper.wordpress.comI did a language teaching CD rom and a friend did the programming
He didn't finish it . I just need some one to finish it .
If you can finish it please shoot me an email
Catchaleme at gmail dot com
Thanks a lot
Maybe you are looking for
-
No sound on iMac Intel 24'' EMC 2267 after hard drive replacement
I replaced my hard drive on my iMac Intel 24'' EMC 2267, due to numerous bad blocks, by following all the instructions on iFixit.com. I did not experience any problems. I then installed all my files from a Time Machine backup. There were no problems
-
IPhoto crashes on launch after upgrading to latest version on ios6
After upgrading iPhoto to latest version available, it crashes after every launch, on my new iPad (the new iPad, iPad 3) What I have already tried: - delete all photos - leave just one album with one (not corrupted) photo - desync albums and resync w
-
Approval process should proceed if deadlins is missed
Hi all, In the workflow WS10400002 (One-step approval) in SRM, when the deadline had exceeded the approval should happen automatically. While checking in the latest end tab, an alert mail can be triggered. but how do we make sure that the approval pr
-
Has anyone been unable to restore their iPad after attempting to upgrade to ios5? error 1
Has anyone been unable to restore their iPad after attempting to upgrade to ios5? I get an unknown error 1 message. Thanks.
-
Revision: 18839 Revision: 18839 Author: [email protected] Date: 2010-11-29 12:26:32 -0800 (Mon, 29 Nov 2010) Log Message: bug fix BLZ-575 Potential race condition in flex.management.runtime.messaging.endpoints.EndpointControl Change a few count