Applescript user interaction - applescript

I am looking for a piece of applescript where the user is asked to select a specific frame in InDesign and then copy its contents into another document.
I use this to create a new structured document within a script.
I have made a script where i ask the user to select a frame with
display dialog "Selecteer kop" buttons {"OK", "Nee", "Cancel"} default button "OK"
if button returned of result is "OK" then
if class of item 1 of selection is in {rectangle, oval, polygon} then
Problem is when i run this part i can't select in InDesign a frame and then go on with my script.

In the chain of actions, don't ask user to select a page item after having displayed the dialog but have the user select the page item and then check the context prior to display the dialog.

Related

How do I create a pop-up window inside the XLSForm?

I have a multiple-select question and I need to show a pop-up window to the form user whenever he/she selects one option, in this pop-up window he will answer more questions and close the pop-up to select another item from the multiple-select question or continue the other form questions.
for example, if I have the following multiple-select question:
select one or more items:
item 1
item 2
item 3
if the user selects an item for (example item 1) a pop window will appear to ask the user to answer a single select question about the gender like the following:
select gender:
male
female
after selecting the gender the user could close the pop-up window and if the user selects another item another pop-up window will appear to ask about the gender and so on.
I wonder if there is a workaround to create it in XLSform or not?
Thanks
No this is not possible in XLSForm.
You could automatically create repeats for follow-up questions after answering all multi-select questions (and each repeat could refer to a single multi-select option), but it will get messed if the users goes back to the multi-select afterwards and changes the selected options. I'm not sure if there is a clever way to prevent that.

Visual Foxpro 9.0

I have a programming problem in Visual FoxPro, create a form that contains PageFrame with 2 Page.
1. On Page 1, Create a program to display data in the grid and give the sorting facilities, navigation and search.
2. On Page 2, create a program to calculate volumeTabung and spacious blanket.
Can anyone provide a solution? thank you
Although this is not DOING the answer, but a simple guide.
In the VFP command window,
Create Form [whatever form name you want]
Once form is up, look at the toolbar for "Form Controls". Click on the "PageFrame" control and then click on the form... There, you have a default pageframe with 2 pages as a default.
The "Properties" window should be visible by default. Click on the combobox on at the top which shows all controls. Open the drop-down and you will see "Page1" and "Page2" of the page frame control. Click on either page, and that will bring focus to that respective page.
Now, click on the Forms Controls toolbar again, such as to grab textbox, label, combobox, whatever and then click on the page and your controls are there. Then get focus to the second page and do the same for whatever you want.
Save and run the form. This just gets you to see the controls and how simple to put them on. Actual pulling your data and populating is really more your "to do" list.

Add record with ID, selecting NAME from another table

Can anyone, please, help me with Libreoffice Base form creation?
I have the following tables:
And I'm trying to add a form to enter new RESOURCES record with the following fields: [RESOURCE_NAME], [CURRENCY_NAME] and [AMOUNT]. But after 10+ tries I have not succeeded. I have tried adding it via wizard, selecting RESOURCES as main form and CURRENCIES as subform and vice versa. I have tried VIEWS and forms based on them. These tries only gave to me or no possibility to enter new record, either creation of the new CURRENCY.
I don't need to create new currency via this form, I only want to enter new Resource (only enter once, not to modify, not to delete). Since I don't want to remember all the ID's I want to select currency name via DropDown list.
Can anyone provide instructions about how to do it, please?
Thanks.
You do not need a subform for this - just create your form document with RESOURCES as the main form (only form).
You will need a listbox to enter the currency item. A listbox has two fields, a display field and a field that is saved in the table. You will set it up to display CURRENCY_NAME and store CURRENCY_ID.
When you create a listbox, the wizard that pops up may get you what you want. If the wizard falls short:
Make sure the form document is open in design mode: on the "Form Controls" toolbar, the leftmost/topmost icon of a pencil with a triangle should be depressed. If this icon is grayed out, close your document, right-click on its name and choose "Edit".
Right-click on the listbox and choose "Control"; this will open the properties window
On the tab "Data" change the "Type of list contents" to "Sql"
In the field "List content" enter SELECT "CURRENCY_NAME", "CURRENCY_ID" FROM "CURRENCIES" ORDER BY "CURRENCY_NAME"
The Bound Field should default to 1. If it isn't 1, change it to 1.
Close the properties window and save your form. It should work as you want now.
If you want a listbox inside a tablegrid: after you create the table, with the form in edit mode, right-click on the column name you want to change and choose "Replace with" and then "listbox".
Edited to include comment by OP about bound field needing to be 1

Going to Specific tab in oracle forms

I have 3 radio button A ,B, C
and I have 3 tab page in the canvas A, B,C.
My Requirement is if user select radio A and press Submit button then tab A Should get activated and my cursor got to tab A.
If it is enabled and visible then you can use the following commands:
go_item('blockname.itemname');
or
go_block('blockname');
If you don't need to go to a specific item then use the second command go_block.
To enable a tab page:
set_tab_page_property('TAB_PAGE_NAME',enabled,property_true);
If the tab page was not visible you should make it visible first:
set_tab_page_property('TAB_PAGE_NAME',visible,property_true);
In order to navigate to that tab page, the easiest way to accomplish that is by going to a navigable item that is in that tab page:
go_item('ITEM_IN_THE_TAB_PAGE');
First you have to set the tab page as top most using set_tab_page_property(top_most_tab_page,'tab_page_name'). after that use go_item('block_name.item_name');
here is the easiest way to do this
In the following code, I supposed that the radio button name is: RADIO_BTN and it's value is 'A'
open submit button properties and set 'keyboard navigation'= No and 'mouse navigation'= No
on tab A create a dummy item (not database item) and name it A, with width=0 and height=0 so the user will not see it, or use a real item name on tab A
open trigger when_button_pressed on submit button and write the following code.
IF :RADIO_BTN = 'A' THEN /*replace this with your radio_btn name and value */
GO_ITEM('A'); /*go to dummy item in tab A or to real item in tab A */
END IF;

Kendo combobox select display text when user clicks the comboxbox to filter

I can't seem to find this anywhere. Is there a way to select the full display text of the combobox when the user clicks in the combobox to filer? By default, when the user clicks into the combobox, the the user has to manually select the full text and delete. I would like to select the text for them so all they would have to do is hit the delete button to remove it.
You can do this by adding a focus-event in the underlying Textbox of the Autocomplete-Control.
See this jsFiddle for a demo: Click Me
Code:
$('input').focus(function(e) {
$(this).select();
});

Resources