LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-18-2006, 11:29 AM   #1
nextekcarl
Member
 
Registered: Oct 2003
Location: Portland
Distribution: Gentoo
Posts: 73

Rep: Reputation: 15
Question KDE --how to make perl program support drag and drop?


I am using KDE 3.4.3 on Gentoo and I just started doing some Perl scripting at work, but they are using Windows. We have scripts where you drag & drop a folder onto a perl script, and it does whatever it is supposed to do and usually spits out a text file somewhere (for reports, etc.) I can get this to work, but I am thinking there must be a keyword, or special variable, or something that I can't find a reference to anywhere. The way I get it to kind of work, is by right clicking on my perl script, and clicking on Properties, and then clicking on the wrench icon for Type, and then under Application Preference order, adding Perl, clicking on Edit, then going to Application and under Command I typed this:
/usr/bin/perl /home/carl/PerlScripts/Work/ProjectProgress.pl

It then works as I want it to, but it changes ALL of my perl scripts to execute this script, so is there a keyword or something I could use as the second argument that would mean "Whatever script is being activated"? I need soemthing like the java keyword this

Thanks for anywone who knows more about KDE than me. I tried checking out KDE.org but they didn't seem to have anything on Advanced User tips that I could find.
 
Old 01-18-2006, 07:50 PM   #2
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Files dropped on an executable are passed to it as command-line parameters. There is no need to change the file associations on Perl scripts. Just change the permissions on the scripts to make them executable, make sure they start with the requisite #! line, and you should be all set.
 
Old 01-19-2006, 12:35 AM   #3
nextekcarl
Member
 
Registered: Oct 2003
Location: Portland
Distribution: Gentoo
Posts: 73

Original Poster
Rep: Reputation: 15
That's what I thought, but it doesn't work (nothing happens). ahhh, just figured it out. I just had to have the /usr/bin/perl right clicking on my perl script, and clicking on Properties, and then clicking on the wrench icon for Type, and then under Application Preference order, adding Perl, clicking on Edit, then going to Application and under Command. Now it works perfectly. Thanks for the info!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag and Drop on CDRW TigerLinux Linux - Software 1 10-09-2005 03:54 AM
Drag & Drop into KView digitalhead Linux - Software 1 03-31-2005 09:59 PM
Disable drop and drag miacarol Linux - Security 1 10-28-2004 02:33 PM
Drag and Drop Fail kajensen Linux - General 2 09-26-2003 06:08 PM
Drag and Drop Fail kajensen Linux - General 0 09-23-2003 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration