Passing multiple USSD commands in a single call - ussd

Say you have a USSD service which has the following structure:
Main menu -> *123#
Menu Item 1 -> Press 1 from main menu
Menu Item 2 -> Press 2 from main menu
Is there any way to dial a single command to go straight to Menu Item 1, for example *123#1 as opposed to dialing *123#, then waiting for the Menu, THEN selecting 1?
Hope the question is clear.

Yes, you have to handle USSD auto dialing in your application.
For example a user should be able to dial *123*2# to go straight to menu item 2.
Check the SMSGH USSD Framework for implementation details here from line 69.

Related

How to use AppleScript or Lua to do an ALT + TAB after results on the Calculator.app

I use the Calculator.app, and after hitting the ENTER key, I would like it to automatically do an ALT + TAB to go to the previous App I was using: Excel or Firefox or Chrome, ... you name it.
I have the same question for just .lua, but if it can't be done with .lua I'd like to do it with AppleScript or with the Automator.
What's the hot key for TAB in .lua? hammerspoon?
UPDATE:
As user3439894 says, CMD + TAB works fine.
But in my end, the TAB is not released, therefore, I keeps on showing all the open apps. So, I tried to put a RETURN as of the documentation. I also tried ENTER , but non of them work.
hs.eventtap.keyStroke({"cmd"}, "tab")
hs.eventtap.keyStroke({"return"})
-- hs.eventtap.keyStroke({"enter"})
Assuming your are using this in conjunction of one of the answers I gave you back in mid November regarding Calculator, then the modified Lua code below works for me to switch to the previous application when pressing the enter key while in Calculator.
Example Lua code:
-- Create a hotkey used to trap the enter key and disable it.
-- It will then be enabled/disabled as Calculator is focused/unfocused
-- When enabled and the enter key is pressed it presses = then command C.
applicationCalculatorEnterHotkey = hs.hotkey.bind({}, "return", function()
-- Press the '=' key to finish the calculation.
hs.eventtap.keyStroke({}, "=")
-- Copy the result to the clipboard.
hs.eventtap.keyStroke({"cmd"}, "C")
-- Bring up the App Switcher.
hs.eventtap.keyStroke({"cmd"}, "tab")
-- Act on the selected App in the App Switcher.
-- This works in testing with Calculator, however
-- may not work in other applications.
hs.eventtap.keyStroke({}, "=")
end)
applicationCalculatorEnterHotkey:disable()
Notes:
I've added two hs.eventtap.keyStroke to the original code with comments.
Executing hs.eventtap.keyStroke({"cmd"}, "tab") in the Console Hammerspoon does automatically switch to the previous application without showing the App Switcher, however when used in the applicationCalculatorEnterHotkey function it shows the App Switcher as if ⌘-Tab has been pressed and the ⌘ key not released. This may be a bug, not sure as not enough testing/research into the issue was done as the obvious solution would be to follow up with programmatically pressing the enter key, however that can not be done from within the applicationCalculatorEnterHotkey function because it is already trapping the enter key in Calculator.
In this particular use case, however this is where hs.eventtap.keyStroke({}, "=") is used to act as if the enter key had been pressed again and is unique to Calculator.

Is there a keyboard shortcut to restart the current console in cmder?

It seems like there is with ConEmu https://conemu.github.io/en/KeyboardShortcuts.html "Win+~" but a way to restart the current console in cmder would be great.
Cheers
Go to Settings - Main - Keys & Macro
Then select "Recreate active console" from the list and set hotkey for it.
This action will show a dialog with three buttons: Restart, Terminate, Cancel. Restart is a default button and you can choose it by just pressing ENTER key.
According to the current help of cmder:
Recreate(<Action>[,<Confirm>[,<AsAdmin>]]), alias "Create"
- Create new tab or restart existing one
Action: 0 - create tab, 1 - restart tab, 2 - create window
Confirm: 1 - show ‘Create new console’ dialog, 0 - don't show
AsAdmin: 1 - start elevated tab
Open Settings - Keys & Macros - Select Macros from dropdown - use one of the unused Macro places (input macro into GUI Macro)
Example:
Recreate(1, 0, 1)
Restart Tab - do not show confirmation window - start as admin

Appium: dealing with android system interactions

I have a simple use-case. Within the android app, press a button and the browser app will open a URL.
The "Open With" dialog pop-up appears and allows you to select Browser or Chrome.
Which looks like this in the appium inspector:
<android.widget.ListView resource-id="android:id/resolver_list">
<android.widget.LinearLayout>
<android.widget.ImageView resource-id="android:id/icon">
<android.widget.LinearLayout>
<android.widget.TextView resource-id="android:id/text1">
<android.widget.LinearLayout>
<android.widget.ImageView resource-id="android:id/icon">
<android.widget.LinearLayout>
<android.widget.TextView resource-id="android:id/text1">
Attempting to automate this seems like it should be trivial, but is causing me trouble. I can get the text of both "Browser" and "Chrome" as discrete AndroidElements, but I cannot seem to be able to actually press the actual options.
Am I allowed to actually interact with these things or is this impossible because it's part of the android system itself?
To help figure this out, here is the setup of my page object.
#AndroidFindBy(id = "android:id/resolver_list")
private AndroidElement listParentElement;
public List<OpenWithOption> getOptions() {
/* ... */
List<MobileElement> elements = listParentElement
.findElementsById(SYS_ID_PREFIX + "text1"); // Here's where I can only get the text element itself but can't figure out how to get the elements above that.
return elements.stream()
.map(mobileElement -> new OpenWithOptionImpl(mobileElement.getText(), mobileElement))
.collect(toList());
}
This was a rookie mistake. Selecting the browser enabled the choice of "Just Once" or "Always" in the bottom of the screen and I didn't notice. I thought that just pressing the browser you wanted would launch it.

Standard print button is inoperative in custom Report

My customer has reported a problem that standard ''print'' button in Z-report which a developer wrote before is not working.
How can I enable the button?
MODULE user_command_0100 INPUT.
DATA: GS_STATUS TYPE SLIS_STATUS,
XS_STATUS LIKE GS_STATUS.
CASE sy-ucomm.
WHEN 'BACK' OR '%EX' OR 'RW'.
LEAVE TO SCREEN 0.
WHEN '&RNT'.
ENDCASE.
ENDMODULE.
Then button needs a usercommand assigned, which is then processed in pai. usually with a general form called get_ucomm (many developers call it similar). You also can issue /h in transaction field and then press the print-button. /h will trigger the debugger and You can inspect the report step by step.
That's all I can say without seeing the code. Hope this will help.
Which user command do you define in your GUI status?
If you have a standard list (what I expect when you write about a z-report), then you should define the command PRI to print the list:
If you define a screen (using the screen painter) or an ALV-Grid... then this solution will not help you.
If you don't know, what a GUI status is: Scan your source code for the command
SET PF-STATUS 'XXXX'.
Then double click on 'XXXX' and you should be directed to the status definition. There may by multiple status (and status with generic names).
I've seen your code and for the &RNT option there's no code to execute, so if the user wants to print the button will do nothing.
MODULE user_command_0100 INPUT.
DATA: GS_STATUS TYPE SLIS_STATUS,
XS_STATUS LIKE GS_STATUS.
CASE sy-ucomm.
WHEN 'BACK' OR '%EX' OR 'RW'.
LEAVE TO SCREEN 0.
WHEN '&RNT'.
" There's no code
ENDCASE.
ENDMODULE.
I've used the 'STANDARD' GUI Status from the function group 'KKBL' and '&RNT' is the code of the print button and that's why I think that is the print button you are refering in your program.
Can you post the GUI Status you are using please?

fetching news from http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss in flash builder mobile application

I want to fetch news from following source in my flex mobile application:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss
I have tried with following steps:
Step 1: I have inser url in Data --> Connect to Data/Services and then I choose option URL
Step 2: Define List control and Drag & drop Getitems() to it.
Step 3: Now,
getDataResult.token = news.getData(/*Enter value(s) for */ pz, cf, ned, hl, topic, output);
it is ask me to define pz, cf, ned, hl, topic, output parameter.
Thanks in advance.

Resources