Openbox script-drag titlebar to unmaximize, help with last step?

Hey all,
I really missed the feature in other WM's where one could drag a maximized window out of maximize and have it restore to the original size. I have written a small shell script to get the size of the current window and then implemented it in rc.xml. The only little issue is that, for some reason, when restoring from the values originally saved, the window comes out of the "maximized" state but retains the maximized dimensions. In other words, I can drag it out of "maximized' but it stays big, and does not go back to the original saved size. Any thoughts?
getdimcur.sh
#!/bin/bash
activew="$(xwininfo -id $(xdotool getactivewindow)|awk '/Width/ {print $2}')"
activeh="$(xwininfo -id $(xdotool getactivewindow)|awk '/Height/ {print $2}')"
echo -en "$activew $activeh" > /home/ts/scripts/curwin/curwindim
rc.xml snippet
<context name="Titlebar">
<mousebind button="Left" action="DoubleClick">
<action name="Execute">
<command>bash /home/ts/scripts/curwin/getdimcur.sh</command>
</action>
<action name="Execute">
<command>wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz</command>
</action>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="if">
<maximized>yes</maximized>
<then>
<action name="Execute">
<command>wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz</command>
</action>
<action name="Execute">
<command>bash /home/ts/scripts/curwin/restorewin.sh/</command>
</action>
</then>
</action>
<action name="Move"/>
</mousebind>
</context>
restorewin.sh
xdotool getactivewindow windowsize $(cat /home/ts/scripts/curwin/curwindim|awk '{print $1}') $(cat /home/ts/scripts/curwin/curwindim|awk '{print $2}')
Testing these commands in terminal individually is successful, so what am I missing?
Thank you.

I have solved moving a window by dragging the title bar with the following openbox configuration, which is located in ~/.config/openbox/lxde-rc.xml on my machine:
<context name="Titlebar">
<mousebind button="Left" action="Drag">
<action name="if">
<maximized>yes</maximized>
<then>
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<y>0</y>
</action>
</then>
</action>
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximizeFull"/>
</mousebind>
</context>
After holding down the left mouse button on the title bar and moving the mouse, the window is unmaximized and moved to the top of the desktop with the actions Unmaximize and MoveResizeTo. Unmaximizing and moving to the top is only done, if the window is maximized. Then in each case the action Move starts the modus for moving the window with the mouse. This configuration simulates nearly the same behavior as in Windows 7 while dragged the title bar with the left mouse button.
After a left double click on the title bar, the action ToggleMaximizeFull switches the window state once between maximized and unmaximized.
See also http://openbox.org/wiki/Help:Actions
Last edited by raimar (2014-01-04 23:48:06)

Similar Messages

  • How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore. Please help with proper steps, if any.

    How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
    On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
    Please help with proper steps, if any.

    Also see... these 2 Links...
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • HT4972 I have an Ipod touch version 4.2.1 and the instructions do not detail how to update to iOS 5. Can you help with me step by step instructions.

    I have an Ipod touch version 4.2.1 and the instructions do not detail how to update to iOS 5. Can you help me with step by step instructions.

    iOS 4.2.1 suggests that you may have 2nd generation Touch, which cannot be updated past iOS 4.2.1
    Check http://support.apple.com/kb/HT1353  for help in identifying your model. A quicker method may be to check the back casing. If your iPod has Model No.A 1288 etched into it, then it's a 2nd gen Touch. 
    Assuming that you are using the latest version of iTunes (today, that is 10.6.3), to check if your iPod can be updated, connect it to your iTunes and look on the Device/Summary pane. Select Check for Updates. If there is one, you will see a message telling you that and how to install it. However, if you see a message saying that your iPod is up-to-date, then it cannot be updated.

  • Help with DBwrite step

    I am attempting to create a new record and append new information stored in a variable to a table.  I am able to get the script  to do a static string but it will not use the value of the string variable I have setup.
    For example:
    user calls in and inputs their phone number.
    script places the number in a variable called PhoneNumber
    The DBwrite step attempts to upload and create a new record to table with the phonenumber field populated by the value in the variable PhoneNumber.
    INSERT INTO tivr_test
    (phonenumber)
    VALUES
    ('PhoneNumber')
    Ayn assistance would be welcome and appreciated.

    Its the oddest thing.  After I originally posted this I did use the
    $PhoneNumber statement and it still did not work.  I then read somewhere that
    IPCC and SQL handle string variables differently and that I would need
    to convert the string to and integer in order to do this.  I did this but neglected to
    change the SQL statement to use the int variable.
      I tested and was able to write the string to the
    table.  It wasnt until I checked the SQL statement that I realized that i was writing a string to the database.  I am still investigating why it is now working.

  • Help with navigation step by step, handlers and train

    HI, im trying to use a train with a navigationbar, to make a relationship between 3 pages in a step by step process, but I can`t configure the links in the next and previous buttons, if it`s posible, could any body help me ?
    to relate this
    <uix:train selectedIndex="1">
    <uix:contents>
    <uix:link text="Conceptos Cobros"
    destination="cobros1.jsp"/>
    <uix:link text="Formas de Pago"
    destination="cobros2.jsp"/>
    <uix:link text="Impresisn"
    destination="cobros3.jsp"/>
    </uix:contents>
    </uix:train>
    and this
    <uix:pageButtonBar>
    <uix:contents>
    <uix:navigationBar minValue="1" maxValue="3" value="2" />
    </uix:contents>
    </uix:pageButtonBar>
    and change between the asp pages.

    Navigation bars do not let you set the destination for previous and next
    separately. Rather, they deliver an event to the specified destination
    (or to the destination on the form, if you're using formSubmitted).
    See the navigationBar documentation for the details on the
    parameters of this event.

  • Need help with basic steps in creating ebook

    I have a confession: I constantly use workarounds instead of stopping and learning the proper way of using Indesign to create ebooks. I wouldn't say I do it because I'm lazy, but rather because I'm simply inept lol. These are some of the basic steps I take:
    1. create new document: include master text frame (because I want page numbers to show)
    2. paste unformatted text into document
    3. adjust size of master frame to give text suitable margins (since its an ebook, right/left margins same on opposing pages.)
    4. highlight all text, adjust before- and after-paragraph spacing to half of the character leading (so bottom of text is at same point for each page)
    5. go to chapter titles; do page-break so title has its own page; highlight title, choose font, size; create new character style; apply style to other chapter titles (is it possible to create a ctrl + number shortcut to apply character styles?). Notice I didn't create a character style for body text. Should I do that first?
    6. insert page number markers on both master pages, then cover page number with white box on first page of chapters.
    7. drop pictures into textbox so that if more text is added, pictures move with the text.
    That's basically what I do when I create an ebook. Any suggestions as to better/proper way to do these things would be very appreciated.

    1. Master text frames have nothing to do with page numbers and in most cases are totally unnecessary. Set the margins appropriately and place your text.
    2. Without knowing what you're starting with it's impossible to tell if that's a good idea or not. My gut says is it's not. See number 1.
    3. See number 1.
    4. This is what paragraph styles are for.
    5. See number 4.
    6. This is what multiple master pages are for. Stop doing that.
    7. Well, you finally got one right. As my people would say...mazel tov.
    Now, it's time for you stop being inept (your word, not mine) and start learning the right way to do this. First thing you do is buy Sandee Cohen's Visual Quick Start Guide. It's the best InDesign book on the market for beginners. http://amzn.to/plsvxy
    Secondly, check out the video training on Lynda.com. This link will get you a free one week trial: http://bit.ly/fcGpiI
    Bob

  • Help with last insert id

    i have create 2 preparedstatement and it is like this,
    PreparedStatement pstmt = con.prepareStatement("insert into placemark(userid, date, time,longtitude,latitude) values(?,?,?,?, ?) ");
    after that i have pstmt.executedUpdate()
    and i have created another preparedStatement for the last_insert_id
    PreparedStatement pstmt1 = con.prepareStatement("SELECT LAST_INSERT_ID(placemarkid)");
    can anybody tell me is my syntext for the last insert id correct?

    hmm, allow me to explain my logic to all of you again. This is my first time using last_insert_id and have no idea how to implement. But i have found out it is performed an insert query into a table that contains an AUTO_INCREMENT field. And my placemarkid is a primary key which is auto_increment.
    Here is my code
    public boolean add(Placemark pm){
            boolean result = false;
            try {
                PreparedStatement pstmt = con.prepareStatement("insert into placemark(placemarkid, userid, date, time,longtitude,latitude) values(?,?,?,?,?,?)");
                pstmt.setInt(1, pm.getPlacemarkid());
                pstmt.setInt(2, pm.getUserid());
                pstmt.setDate(3, pm.getDate());
                pstmt.setTime(4, pm.getTime());
                pstmt.setDouble(5, pm.getLongtitude());
                pstmt.setDouble(6, pm.getLatitude());
                int num = pstmt.executeUpdate();
                if(num==1)
                    result = true;
                //  PreparedStatement pstmt1 = con.prepareStatement("SELECT LAST_INSERT_ID FROM placemark WHERE placemarkid = ?");
                //pstmt1.setInt(1, pm.getPlacemarkid());
                // ResultSet rs = pstmt1.executeQuery();
                pstmt.close();
                // pstmt1.close();
            } catch(SQLException e){
                e.printStackTrace();
                result = false;
            return result;
        }ok, i need to query out the last insert id and set it into the placemark object using the "setPlacemarkId" method.Also, the sql statement to get the last inserted id is "SELECT LAST_INSERT_ID()".Can anyone please help me of the last_insert_id. I;m quite confused to the previous post that u all have send me as this is my first time using.

  • Help with the insert table/form tool in BIP 10.1.3.2.1

    Hi, I'm trying to use the insert table/form tool in BIP, and running into some issues that I don't understand. First off, my data coming in looks like this (left column of tool):
    Rowset
    --- Row
    ------ Customer ID
    ------ Customer Name
    ------ Customer City
    ------ Product
    ------ Amount Sold
    I would like the output to do the following:
    a) have one page per customer. Customer should be determined by customer ID, and has attributes of customer ID, customer Name, Customer City
    b) Show a table of all products and the total Amount Sold by product for that customer
    c) Give a "grand total" for the customer
    Can someone help with the steps needed to do this? I've tried several variations of the following without much luck:
    1) Added Rowset and all children to the "Template" pane
    2) Clicked on the "Row" group, and set Grouping = Customer ID, with a break of "New page per Element"
    3) Clicked on the newly created (from step 2) Cust ID group, and set it to group by Product
    4) Moved "amount sold" to be at same level as Product
    5) Moved all of the customer attributes (name, address, etc.) to be at same level as Cust ID
    6) On the Cust ID level, set the style to table
    7) on row and rowset levels, set style to free form
    This seems to be VERY close, except that it isn't creating a total amount for the sum of all products purchased by a customer. What do I need to do inside the tool to get a total per customer to show up?
    Thanks in advance!
    Scott
    p.s. the final hierarchy in the template window looks like this:
    Rowset (style = freeform, no grouping/sort by/breaks)
    --- Row (style = freeform, group by customer ID, break new page per element)
    ------ Customer ID (style = table, group by product, no breaks)
    --------- Product (nothing special)
    --------- Amount Sold (calc for grouping = SUM)
    ------ Customer Name (nothing special)
    ------ Customer City (nothing special)
    Thanks very much for the help!
    Scott

    To anyone else who sees this post, the answer is to do the following. Insert the Amount Sold field using the "Insert Field" tool, and set the function to sum, with the grouping checkbox turned on.
    Thanks,
    Scott

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Need help with easy script for open / close app and move files

    Hi,
    I'm not a scripter.. never done anything special perhaps more complicated than /shutdown -s on cmd..
    I actually learned ASCII C language on university but never used it in real.
    I'm trying to create a basic script that perhaps you could help me or guide me how to do it..
    The commands are
    1) Close a running app (end task it or force kill it, I prefer end task it)
    2) delete files from x location
    3) run .exe app from y location
    4) close that running app 
    5) move files from z to y
    Perhaps adding few "wait few seconds" commands in between each, so the apps will launch successfully..
    My first question will be whats the easiest script language to do that?
    I tried VBScript but couldn't find commands for open or close apps.. also for controlling files..
    And what commands can do that? I could google them up for better understanding no need for rough guide
    And lastly, does it too hard? If it takes more than hour to make it (learn and process) than it ain't worth it..
    Thanks alot ahead!
    Jordan.

    hmm 2 questions:
    1) taskkill.exe causing me access deny error.. I used "taskkill.exe /IM softwarename.exe"
    how do I get permission or something to fix that?
    2) on the "move" command..
    First, its a "copy" instead.. but I easily figured that out.. 
    but more important is that I want to copy a folder.. with unknown list of way too long files and sub folders..
    and all I see is ability to move a file..
    Is this possible?
    Thanks

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • Help with web form script. PHP, CGI, Perl???

    anyone willing to help with a web form script? I have a form built, but cant seem to figure out the scripting! Should I be using Perl, CGI, PHP... What do I need to enable? I am a complete novice when it comes to scripts. Looking for a little friendly help.

    Here is a simple bit of PHP to stick in the page your form posts to. You would need to edit the first three variables to your liking, and add the html you want to serve afterwards:
    <pre>
    <?php
    $emailFrom = '[email protected]';
    $emailTo = '[email protected]';
    $emailSubject = 'Subject';
    $date = date('l, \t\h\e dS \o\f F, Y \a\t g:i A');
    $browser = $HTTPSERVER_VARS['HTTP_USERAGENT'];
    $hostname = $HTTPSERVER_VARS['REMOTEADDR'];
    $message = "$date\n\nAddress: $hostname\nBrowser: $browser\n\n";
    foreach ($_POST as $key => $value) {
    $message .= $key . ": " . $value . "\n";
    $mailResult = mail($emailTo,$emailSubject,$message,"From: $emailFrom");
    ?>
    </pre>
    This script will grab the server's date and the submitter's address and browser type. It will then list the name and value of each form field you have put on your form.
    Also, this script expects your form method="post".
    Lastly, you can offer alternate text later on in your html page based on the success of the above script with a snippet like this:
    <pre><?php
    if ($mailResult) {
    echo "Your comments have been received thank you.";
    } else {
    echo "There was an error. Please try again or contact us using an alternate method.";
    ?></pre>

  • Help with Scripting forms when additional characters added

    Hi,
    I am new to scripting in adobe professional, I thank anyone in advance for any advice or help they can give me.
    I am trying to use the calcuations within the forms that I am putting fields onto.  In the process I discovered that the program the forms are within are attaching a pipe and additional characters after the actual name that I have named them.  So, I am not able to use even the simple calculations within adobe to "sum" fields.   For example: I named the field "1_1Text" and this is what displays when you go into the calculations and pick the fields you want.  But the actual name is "1_1Text|1234567" so the calculations will not work.
    I take it then I need to use the advanced scripting but I am unsure of the format for a routine such as this.  I have a little knowledge of javascript but it has been awhile.  There must be a scan to find the pipe and then you should be able to chop off the extra characters since I will never know the characters the program adds on so then I can do calculations on these fields. Then you would have to put them into an array or something to save them?   Any help with a script or hints would surely be appreciated.
    Thanks!

    Could explain more fully how you are creating your forms and what programs you are using from the creation of the base document to which program and how you are adding fields.
    I think you are misunderstanding me.   I use Adobe Acrobat Professional 6.0.  I can get the calculations to work correctly if I use the form as it is after creating it. 
    But these forms are put into an SQL database and they get selected within a VB.net program or ASP.net program (both are used).  So these programs (VB.net or ASP.net) are adding the extra characters at the end, hence I do not know the names of the fields when the forms are being filled in.  So the calculations do not work with the "original names" that I created for the fields.
    I just figured if I created a routine that looped through and chopped off the extra characters these programs put on the end I would be able to do the calcuations and they would work.  I believe there is a substring operation within javascript.

  • Help with simple script

    I was wondering if someone could help me with a simple bit of action script 3. I need to make a movie clip (single_mc) disappear when the user clicks on the mouse (stop_btn). Here’s what I have so far.
    function setProperty(event:MouseEvent):void
    single_mc.alpha=0;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);
    Also I was wonder if you could recommend an Action script 3 book for me. I would like one that is not a training book, but has situations and then the script written out. For example: I click a button and a movie symbol disappears from the stage. I am a graphic artist, that from time to time, needs simple interaction in flash, but cant justify the time to learn the script.
    Thanks for your time

    use the snippets panel to help with you with sample code for basic tasks.
    function setProperty(event:MouseEvent):void
    single_mc.visible=false;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);

Maybe you are looking for

  • Powerbook not recognized on Windows 7 PC

    Hi everyone, I am having trouble finding a driver for my PC to recognize my Powerbook G4 running Tiger OS X. The PC is running a Windows 7, 64bit system. When I connect the devices using a firewire cable the PC recognizes the new HW, but it cannot fi

  • ORA-01858 error in Application but not in sqlpluss

    Hi. I have this query that runs nicely in sqlpluss and the SQL Commands that came with Expressedition 10g, but when I put it in a report region it produce: report error: ORA-01858: a non-numeric character was found where a numeric was expected query:

  • Migrating from Azure SQL Database to SQL Server VM

    I'm looking for steps/documentation to migrate a database from Azure SQL Database to SQL Server VM in the cloud. I want to make an app whose data is initially hosted in the former. Due to a few reasons, I might have to migrate to SQL Server VM. I'd l

  • Tcode VF02 RAISE statement in the program "SAPLCSS3" raised the exception.

    Hi,       I am getting a short dump in my smartform attached with vf02. For few of invoice no. its working perfectly but giving dump in few invoice no. Below is short dump statement. Pls guide me for this issue. A RAISE statement in the program "SAPL

  • Reg:Confirmation should not happen without issuing goods.

    Hi Friends. We have an issue regarding goods movement. I need to know, is there any setting can be made for the below issue. 1. how to make settings that confirmation of production order or any goods movement( Of finished good) , should not be done u