LinuxQuestions.org
Register a domain and help support LQ
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 05-16-2010, 02:27 PM   #1
boblikeslinux
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Rep: Reputation: 1
gimp script-fu or python-fu user interaction


Is it possible to get user interaction in these scripts? They are for batch processing is my belief so perhaps not, but I would like to make a function whereby I can click it, a selection box of an exact size appears, I then place the selection box and press something, a new file is born. Is this possible? Thank you!
 
Old 05-16-2010, 03:13 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,488

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
I'm not sure about what you're trying to accomplish, but in script-fu you can create a dialog box to accept user input. Items in the dialog box can be specified and customized in the script-fu-register section at the end of the script. Here is a good example with an explanation of the available keywords. Each of these selections will be an argument to the main function. For example:
Code:
(define (script-fu-parrot inString)
; pop-up a message with the string typed by the user
(gimp-message inString)
)

(script-fu-register
"script-fu-parrot"
"<Toolbox>/Filters/Parrot"
"This procedure echoes a user defined string and exit"
"colucix"
"none"
"May 16, 2010"
""
SF-STRING "Type something" ""
)
Here the value entered as SF-STRING in the dialog box is passed to the function as the first (and only) argument "inString". Is this what you mean?
 
  


Reply

Tags
gimp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to automate an installation script suppressing user interaction aditi Programming 2 02-08-2010 11:43 PM
how to automate an installation script suppressing user interaction aditi Linux - Newbie 1 02-06-2010 05:56 AM
needed help in ruby script where user interaction is necessary? wrapster Programming 10 08-08-2008 01:50 AM
Needed help in a ruby script with user interaction involved! wrapster Solaris / OpenSolaris 2 08-06-2008 10:47 PM
python os interaction help JoeUser11 Programming 6 06-22-2005 11:46 PM


All times are GMT -5. The time now is 02:57 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration