Results 1 to 4 of 4

Thread: GUI Scripting

  1. #1

    GUI Scripting

    Couldnt think of anything better for the title.

    I Have been messing with AutoIT http://www.autoitscript.com/autoit3/ on 'doze machines - pretty cool stuff.

    Anyone know of anything like that for linux? Like I dont need to make a GUI but to manipulate them, send keystrokes etc.
    Its better to regret something you have done than to regret something you havent done :P

  2. #2
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Check out Gambas: http://gambas.sourceforge.net/

    Its alot like Visual Basic for windows, but you can create your GUI then 'attach' other scripts/programs to GUI actions. I wrote a couple of real basic gui's then attached shell scripts to a couple of button clicks. It will give your programs a gui very quickly as everything is drag-n-drop
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  3. #3
    Newbie
    Join Date
    Feb 2006
    Location
    Florida
    Posts
    3

    KDE Kommander & Dialog Scripting tools

    KDE Kommander may be what your looking for, and there may be something similar for Gnome/GTK+...
    http://hektor.umcs.lublin.pl/~mikosm...roduction.html
    http://docs.kde.org/stable/en/kdewebdev/kommander/
    http://kde-apps.org/content/show.php?content=12865

    Here are some notes on linux tools for scripting 'Dialogs' you may find useful...

    There is a unix scripting user-feedback utility called 'dialog' (man -k dialog), which is curses based and does not run well in a gui env. Each desktop env has developed it's own version of dialog or contains the programming tools to do it. For Xwindows, it was called 'Xdialog', for KDE 'Kdialog', Gnome uses 'GnomeDialog' library functions in the powerful GTK+ toolkit (similar to Tcl/Tk). Here are some links on how to make user feedback dialog window widgets pretty & functional... without spawning terminals that can go awry.

    Improve Bash Shell Scripts Using Dialog - Linux Journal
    http://www.linuxjournal.com/article/2460
    Advance Bash Scripting - Shell Wrappers - LoggingWrapper
    http://www.tldp.org/LDP/abs/html/wra...LOGGINGWRAPPER

    xdialog - A Python wrapper for the Xdialog - Chris Arndt Python Software
    http://www.chrisarndt.de/en/software/python/

    KDE - Kdialog
    http://developer.kde.org/documentati...dialog/t1.html
    kdialog dialog types - message box - progress dialog
    http://developer.kde.org/documentati...ialog/x85.html

    GNOME Programming in Linux using GTK+ LG #70 - Dialog boxes
    http://linuxgazette.net/issue70/ghos...Dialog%20boxes
    http://www.linuxheadquarters.com/how...g/dialog.shtml
    http://linuxheadquarters.com/howto/p...w/window.shtml
    GTK+ Gnome Application Development - User Communication Dialogs
    http://developer.gnome.org/doc/GGAD/cha-dialogs.html
    Making application programming easy with GNOME libraries - developerWorks
    http://www-128.ibm.com/developerworks/library/l-gnome3/
    Sawfish and the Gnome Run Application dialog
    http://linux.seindal.dk/item48.html

  4. #4
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342

    Ruby

    There is also ruby.

    Ruby Example.
    #!/usr/bin/env ruby

    print "Enter your name: "
    name = gets
    print "Hello, #{name}"


    <b>Ruby Gtk2 Example<b>
    #!/usr/bin/ruby

    # This initializes our library
    require 'gtk2'


    def hello( widget )
    puts "Hello World"
    end

    def delete_event( widget, event )

    # If you return false in the "delete_event" signal handler,
    # GTK will emit the "destroy" signal. Returning true means
    # that you don't want the window to be destroyed.
    # This is useful for popping up 'are you sure you want to quit?'
    # type dialogs.
    puts "delete event occurred."

    # Change true to false and the main window will be destroyed with
    # a "delete_event".
    return true
    end

    # Another callback
    def destroy( widget )
    Gtk.main_quit
    end

    # This is called in all Ruby-GNOME2 applications.
    Gtk.init

    # Create a new window.
    window = Gtk::Window.new( Gtk::Window::TOPLEVEL )

    # Sets the window title.
    window.set_title( "helloworld.rb" )

    # Sets the border width of the window.
    window.set_border_width( 10 )

    # When the window is given the "delete_event" signal (this is given
    # by the window manager, usually by the "close" option, or on the
    # titlebar), we ask it to call the delete_event method
    # as defined above. The data passed to the callback
    # method is nil and is ignored in the callback method.
    window.signal_connect( "delete_event" ) {
    delete_event( nil, nil )
    }

    # Here we connect the "destroy" event to a signal handler.
    # This event occurs when we call Gtk::Widget#destroy on the window,
    # or if we return false in the "delete_event" callback.
    window.signal_connect( "destroy" ) {
    destroy( nil )
    }

    # Creates a new button with the label "Hello World".
    button = Gtk::Button.new( "Hello World" )

    # When the button receives the "clicked" signal, it will call the
    # method hello, passing it nil as the argument. The hello
    # method is defined above.
    button.signal_connect( "clicked" ) {
    hello( nil )
    }

    # This packs the button into the window( a Gtk::Container )
    window.add( button )

    # The final step is to display the newly created widget
    button.show

    # And the window
    window.show

    # All Ruby-GNOME2 applications must have a Gtk.main. Control ends here
    # and waits for an event to occur ( like a key press or mouse event ).
    Gtk.main
    Wenn Sie Spaß meines Englisch mich Willensfuckingtötung Sie bilden.

Similar Threads

  1. Newbie looking for scripting help.
    By evilspoon in forum Programming
    Replies: 3
    Last Post: 10-04-2007, 04:14 PM
  2. Perl Scripting
    By CP in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 03-04-2004, 11:39 AM
  3. need some bash scripting help
    By mountainman in forum Programming
    Replies: 2
    Last Post: 08-30-2002, 12:44 PM
  4. Scripting question
    By kenshi in forum Programming
    Replies: 19
    Last Post: 05-30-2002, 08:40 AM
  5. Bash Scripting
    By cuban in forum Programming
    Replies: 3
    Last Post: 09-10-2001, 01:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •