Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Help with showQ

  1. #1
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default Help with showQ

    Somebody please help me, I am trying to develop some apps for my personal use that will use bints showQ, someone PLEASE help me on how to use this wonderful binary?

  2. #2

    Default

    How to use Bint's showQ

    by calling /mmc/mmca1/.system/QTDownLoad/showQ/showQ

    with this parameter

    -1 XXXX for 1st button caption.
    -2 XXXX for 2nd button caption.
    -3 XXXX for 3rd button caption.

    showQ default display 2 button. if you need 1 button use -2 "".

    -t SSS for display dialog for SSS sec.
    -u for display unicode caption and message.
    -m XXXX for message. message can be use a HTML Tag.
    -g XXXX for display dialog icon from file. XXX is a 50x50 gif image file with full path.
    -s XXXX for display dialog icon from system icons. XXX is a icon in iconres.ezx only it name i.e. if you nedd to use Dialog_Complete.g.gif use -s "Dialog_Complete"

    showQ return 0, 1, 2 when button 1,2, and 3 was taped. here is a sample use of showQ

    see example in my mpkg app like Ezxmpkg A1200, E6, Compressor, LoopCap, or EzxCheck.[/quote]
    Attached Files Attached Files
    Visit my Blog here.http://my.opera.com/eakrin

  3. #3
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default

    Thanks a lot!!! But how do I make it execute a command or show another popup window after I press the button?
    M355 W1th Th33 b35T, d13 L1k3 tH3 R35t
    m41d3n is not the same person anymore, he sold his MING to me and now I'm just using his username.
    http://www.zopcar.cg.yu/

  4. #4

    Default

    so here is a shell script programming tuterial from me.

    # set EZX variables before call showQ.
    . /home/native/.profile >> /dev/null
    result=''
    # use while loop for looping user selection until user select exit.
    while [ "$result" != '0' ]; do
    # Display showQ dialog message and get it result.

    # get result of showQ into variable. result=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -u -1 "Exit" -2 "About" -m "Testing Appl
    byeakrin @ motorolaFans.com"`
    # selection of user action.
    case "$result" in
    1 )
    # Display about dialog.
    /mmc/mmca1/.system/QTDownLoad/showQ/showQ" -u -1 "Ok" -2 "" -g "App.gif" -m "Testing App Version 1.00"
    ;;
    * )
    # Exit application.
    exit
    ;;
    esac
    done
    Visit my Blog here.http://my.opera.com/eakrin

  5. #5
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default

    Thanks eakrin you are the man!!!
    M355 W1th Th33 b35T, d13 L1k3 tH3 R35t
    m41d3n is not the same person anymore, he sold his MING to me and now I'm just using his username.
    http://www.zopcar.cg.yu/

  6. #6
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default

    Now eakrin I have a problem, can you please help me. Whenever I run my app and tap "exit" next screen pops up, and it shouldn't, it should just exit. When I press "exit" on that second window, the third one pops up. I just can't make the app close unless I see all three windows.
    Here's the script. I would appreciate if you told me where I went wrong.
    Code:
    #!/bin/bash
    # Made by m41d3n at motorolafans.com
    # m41d3n -- Andrija Midzor
    # Multi-use application
    # Uses bint's showQ binary
     
    export QTDIR=/usr/lib/ezx
    . /home/native/.profile >> /dev/null
    
    result=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -g "/mmc/mmca1/.system/QTDownLoad/showQ/showQ.gif" -m "Welcome to multi-use application written by Maiden! Please choose any of the options below..." -1 "System" -2 "Manage Files" -3 "Exit"`
    result2=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -s "Dialog_Question_Mark" -m "Please choose any of the options below..." -1 "Reboot" -2 "Swap" -3 "Cancel"`
    result3=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -s "Dialog_Question_Mark" -m "Please choose any of the options below..." -1 "Cleanup" -2 "Hide" -3 "Cancel"`
    case "$result" in
    0 )
    	case "$result2" in
    	0 )
    	start-stop-daemon -S -c root -x /sbin/reboot
    	;;
    	1 )
    	swapon /mmc/mmca1/.bin/swap.bin
    	;;
    	2 )
    	exit
    	;;
    	esac
    ;;
    1 )
    	case "$result3" in
    	0 )
    	rm /mmc/mmca1/*.log ; rm /mmc/mmca1/QuickNotes/*.txt ; rm -r /mmc/mmca1/Recycled ; rm -r /mmc/mmca1/Syste*
    	;;
    	1 )
    		if [ -d /mmc/mmca1/Office/Skit]
    		then mv /mmc/mmca1/Office/Shit /mmc/mmca1/Office/.Skit
    		else mv /mmc/mmca1/Office/.Shit /mmc/mmca1/Office/Skit 
    		fi
    	;;
    	2 )
    	exit
    	;;
    ;;
    2 )
    exit
    ;;
    esac
    done

  7. #7

    Default

    #!/bin/bash
    # Made by m41d3n at motorolafans.com
    # m41d3n -- Andrija Midzor
    # Multi-use application
    # Uses bint's showQ binary

    export QTDIR=/usr/lib/ezx
    . /home/native/.profile >> /dev/null

    result=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -g "/mmc/mmca1/.system/QTDownLoad/showQ/showQ.gif" -m "Welcome to multi-use application written by Maiden! Please choose any of the options below..." -1 "System" -2 "Manage Files" -3 "Exit"`
    result2=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -s "Dialog_Question_Mark" -m "Please choose any of the options below..." -1 "Reboot" -2 "Swap" -3 "Cancel"`
    result3=`"/mmc/mmca1/.system/QTDownLoad/showQ/showQ" -s "Dialog_Question_Mark" -m "Please choose any of the options below..." -1 "Cleanup" -2 "Hide" -3 "Cancel"`
    case "$result" in
    0 )
    case "$result2" in
    0 )
    start-stop-daemon -S -c root -x /sbin/reboot
    ;;
    1 )
    swapon /mmc/mmca1/.bin/swap.bin
    ;;
    2 )
    exit
    ;;
    esac
    ;;
    1 )
    case "$result3" in
    0 )
    rm /mmc/mmca1/*.log ; rm /mmc/mmca1/QuickNotes/*.txt ; rm -r /mmc/mmca1/Recycled ; rm -r /mmc/mmca1/Syste*
    ;;
    1 )
    if [ -d /mmc/mmca1/Office/Skit]
    then mv /mmc/mmca1/Office/Shit /mmc/mmca1/Office/.Skit
    else mv /mmc/mmca1/Office/.Shit /mmc/mmca1/Office/Skit
    fi
    ;;
    2 )
    exit
    ;;
    esac <-- are you forgot to end case selection for $result3 here
    ;;
    2 )
    exit
    ;;
    esac
    done <-- done with out while loop.
    My tuterial structure is

    ++++++++++++++++++++++++++++++++++++
    while result != exit do
    get result from showQ.
    selection case of result.
    do each case.
    end selection.
    done while
    +++++++++ PSUDO Code ++ Not a script code +++++

    with while loop. application will looping showQ to get result and do case that you select from showQ until result is exit (useser tap exit button).

    if you want your app to linear flow (do something and exit) remove a while - done loop.
    Visit my Blog here.http://my.opera.com/eakrin

  8. #8
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default

    eakrin thanks again, problem solved! Now just one more thing and I won't disturb you anymore I promise
    How can I redirect a command to another line? What I want to do is that if I press cancel it goes back to line 18. Is that possible?

  9. #9

    Default

    I 'm not a professional programmer. but most of computer language today do not use goto statement. (Goto use to jump to line that we want) It can make you program does not structural flow. (see detail in another basic programming book. I can't explain it)

    but how to solve this problem is use function for a duplicated work when coding.

    create a function out of any loop and before calling in

    function_name() {
    doing something
    }
    and start coding until you need to do a this work. just call

    function_name
    or write a duplicated code directly if does not much lines.

    f think you need to restructure your program flow. like

    get result1
    case result1
    do 1.1
    +-- get result2
    +-- case result2
    +-- +-- do 2.1
    +-- +-- do 2.2
    +-- +-- do nothing
    do 1.2
    +-- get result 3
    +-- case result3
    +-- +-- do 3.1
    +-- +-- do 3.2
    +-- +-- do nothing
    do nothing
    Visit my Blog here.http://my.opera.com/eakrin

  10. #10
    Join Date
    Aug 2007
    Location
    Winnipeg, Canada
    Posts
    39

    Default

    Maiden, good job bro! If you're interested, here's a good site for shell tips, tricks and general good coding practice. http://www.shelldorado.com/

    Eakrin, thanks for the tutorial on showQ. I've just started trying to decipher this myself, so its appreciated. The other day I saw mention of suite of QT shell plugins (showQ, showRadio, showNotify, etc)... do you have or know where I can get ahold of this package? The reference I saw was a bin for the E6 which had these builtin.

    With 15 years of scripting experience, I'm anxious to see what I can make my ming do. I have to laugh at the looks I get when people ask me if I'm writing a novel or something, and I tell them nope, debugging code.


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. .system folder - MPKG, Busybox, Loader & ShowQ
    By dellsonic in forum E6 General Chat
    Replies: 46
    Last Post: 08-18-2010, 08:58 AM
  2. QT Restart not showq
    By zar603 in forum E6 General Chat
    Replies: 3
    Last Post: 02-10-2008, 04:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1