termbox-go - Reading data from the console - linux

I am very new to Go and went through some of the basic examples and literature around Go Lang. Currently I am working on a project where I need to create a terminal application. After reading around termbox-go we have decided to use the termbox-go as the base library for the development.
The application is very simple where the user will be provided with a set of menus as follows
Main Menu
---------
01) Menu 1
02) Menu 2
03) Menu 3
99) Quit
Please enter your selection : __
I am able to get the layout and all everything done after looking through the examples. But it no where I am not seeing any examples of where the selection is read from the terminal. The user will hit "Enter" key after the selection is done.
Can anyone can share an example which shows how to achieve the above.
Also is there any examples where the user screen has multiple input areas where user can move using up and down key and enter the values - as below
Enter Name : _____________
Enter DOB : ______________
Enter City: ______________
Any examples or pointers are highly appreciated.
Thanks

As for how users could enter text you could check out this example https://github.com/nsf/termbox-go/blob/master/_demos/editbox.go
In the example nothing happens when you press Enter but that's just because it's not handled in the main loop. Also you could expand this example with multiple edit boxes and map the up/down arrows to change which box has focus.

Related

Remove all the blocks dragged by the user in Blockly

I am using Blockly library for a project. I want to remove all the blocks dragged by the user from the toolbox on pressing the reset button.
Can someone help with how can this be done. Which function do I have to use?
This is implemented in Blockly by fa279b9. The user can do a context menu click on the workspace and select "Delete X Blocks" where X will be the number of blocks in the workspace:

Blue prism automation

I’m automating importing VBOs to blue prism. I’ve developed successfully up until the final screen where one has to click the “finish” button.
Even as a user clicking enter on my keyboard does not work. Please assist - perhaps there’s a shortcut I can use?
Blue Prism has a command line interface which can be used for importing VBOs.
the command looks like this:
AutomateC.exe /user admin password /import "VBO\BPA Object - Calendars.xml"
Use Root Element and start sending "Global Send Key" for enter keystroke "{ENTER}" use this one and definitely it works.
You can try to Map it as a Region, or as a Win32 element if the HTML is not working.
Last change, inject javascript code to trigger the download but it's a bit harder.

Change Keyboard Mapping

Hello and thank you in advance,
I am wondering if there is a way to change the layout of my keyboard (software-wise).
The problem is that, on my laptop's keyboard, the Page Up and Page Down keys are combined with the Home and End keys respectively (i.e. to use Home, I have to use the command fn+PgUp/Home).
Is there a way for me to switch what my keyboard receives in Windows 8? If I press the PgUp/Home key I would like the Home command to be entered, and if I entered fn+PgUp/Home I would like the PgUp command to be entered.
I have tried googling for this using several different keywords, but haven't been able to find anything.
Any help is appreciated,
Zach
This is a duplicate question.
You can find an answer here:
https://superuser.com/questions/694465/remapping-a-keyboard-key-in-windows-8-1
Keep in mind this does require registry edits which can be dangerous and can lead to critical failures if not done correctly. Always create a restore point before making any registry edits.

Button-Triggered Insert File Only Works If Portal Contains Edit Box for Container Field

I'm working with a FileMaker Pro 11 database that contains a portal. I've added an "attach file" button to the portal which triggers a simple "Insert File[portal_table::attachment_field]" script. When I click on the button, I would expect an insert file dialog box to appear. Instead, nothing happens.
If I add a text box to the portal, setting the text box's field to portal_table::attachment_field, the attach button starts working.
Why am I required to add this text box to the portal in order for my button-triggered script to work? Is there a way I can modify my script so that it works without requiring the text box's presence?
Thank you,
Ben
Generally speaking FileMaker's "Insert..." commands behave as if a user has done an action manually (activating script triggers, selecting the field, etc.) including the requirement that the field actually be displayed on the screen.
Unfortunately, as far as I am aware, there is not a way to use "Set Field" to specify a file to be added to a container field. One possible work-around is the following:
Freeze Window
Set Variable [$RecordIndex to RelatedTable::Index]
Go to Layout [A Layout of RelatedTable specifically for inserting files]
Enter Find Mode
Set Field [Index to $RecordIndex]
Perform Find
Insert File
Go to Layout [Original Layout]
Alternately, it may be easier to just include the field on the layout at a very small size (1 pixel x 1 pixel).

Assigning often used code blocks to Keyboard Shortcut (DreamWeaver)

have any of you dreamweaver users had cases in which you are programming and finding yourself to use a particular piece of code over and over...
and over? See, I use all day the following pieces of code:
<?=__("
&
")?>
Question:
Is there anyway you programmers have found out a way to assign your favourite/most used code into a keyboard shortcut? I would love to put assign my two things to something like
Ctr+Shift+Num7 = [whatever programming code]
Ctr+Shift+Num9 = [whatever programming code]
Any suggestions would be very awesome as I know this is very specific...
I have tagged this question ad dreamweaver & adobe-dreamweaver only, this way hoping to find folks who have programming experience and have come across this real-world issue.
Dreamweaver allows you to assign keyboard shortcuts to Snippets.
Window -> Snippets
Create a snippet (click + button at bottom of the panel, or right click within the panel and choose New Snippet), in this case it appears that you want to have "wrap selection". Place the snippet content into the appropriate areas, give it a name an option description.
Edit -> Keyboard Shortcuts (or right-click in the Snippets panel select Edit Keyboard shortcuts.
Create a new keyboard shortcut set if have don't already have a custom set.
In the short cuts editor, make sure to select Snippets in the Commands list.
Select your snippet (it may be nested within a "folder", so drill in to the snippets locations).
Click + by Shortcuts
Enter your keyboard combination by hitting the key combo you want to use for this snippet.
Click OK
test your new snippet keyboard combo.

Resources