Active state is working fine with link like /something but when my url like /something/something it doesn't work. It expands all the sub menu of the menu bar.
Related
I have Maximo 7.6.1.1.
I would like to run an automation script from a custom Action button (in WO List View).
I've created an automation script with an action as a launch point. And I think I need to somehow reference the action in Application Builder >> Select Action.
But I've been unsuccessful in doing this--I've just been making random guesses at which options to choose, and of course, it hasn't worked.
How can I run automation script from a Action in WO List View?
You first create a SIGOPTION for the application (in the Application Builder app), but with the description that you want to appear in the menu. Then, create an entry in the "select action" menu that references your sigoption (again, in the Application Builder app). You do not have to fill in any description or details in the menu entry, that will be inherited from the sigoption (which is why you created that first). Give yourself the permissions for this sigoption. This is the usual way to get a menu entry into the system to do something.
I skipped the key information to tie the sigoption/menu entry to a script for ease of explaining adding the menu entry, but there are two key things to do to make this entry run an automation script. The first is the sigoption must be named exactly the same as your action that you created for your automation script. The second is that you must select the radio button at the very bottom of the sigoption dialog, in the "Advanced Signature Options" section, labeled "This is an action that must be invoked by user in the UI".
With those things in place, your menu should now be configured to run your automation script when selected in the application.
I have created a JavaFX application which uses the native menu bar on the Mac via
menuBar.setUseSystemMenuBar(true);
This results in 4 standard Mac menu items in addition to the ones I have defined. My problem is that these additional items are all in english and not in german as the rest of the application. My Mac is set up for german and the Java default locale is german as well. Can anybody tell me how I can modify these default entries so that they obey the language settings of my machine?
I don't know if it is possible to set the language of the menu bar directly using Java code. But you can bundle your application and then add localization folders for every language you want to support.
For example, if your application bundle is called "test.app", simply create a folder test.app/Contents/Resources/German.lproj. Now when you start the application, the standard menu will automatically appear in german language.
You can use NSMenuFX to access the auto generate menu bar on OS X and then rename the menu items like this:
NSMenuBarAdapter adapter = new NSMenuBarAdapter();
// Get the default menu bar as JavaFX object
MenuBar menuBar = adapter.getMenuBar();
// Change the name of the first menu item
menuBar.getMenus().get(0).setText("Hello World");
// Update the menu bar
adapter.setMenuBar(menuBar);
It might not be the most elegant way to do localisation, but for me it works ;)
I'm trying to make an OS X app, and for some reason, I can't find anything on how to add items to the Main Menu (File, Edit, etc), and how to actually handle those actions. Everything I've found is how to implement a Status Bar application, which is not what I want. Can anyone help?
The menu bar is part of your application's MainMenu.nib, and can be edited there. Like other user interface objects, each menu item has a target which can be configured to control what it does.
A video tutorial is available here. (I'm not usually a fan of videos, but this one is so perfectly on-target that I'm making an exception.)
I am using AutoIT within Internet Explorer to navigate from one web page to another
The code I am using is:
_IENavigate($oIE, "http://www.google.co.uk")
However the web page that it is coming from displays a JavaScript popup box. I would like to click the OK button to allow the Navigation to proceed
I have tried using the following code:
ControlClick("Windows Internet Explorer", "", "[CLASS:Button; TEXT:OK; Instance:1;]")
However this doesn't work due to the fact that when the dialogue box appears the AutoIT process seems to pause itself.
The title on the dialogue box is "Windows Internet Explorer" and there are two buttons. The button I would like to click has the text of "OK"
Has anyone else come across this before? If so how can I solve this problem?
_IENavigate by default waits until the page is fully loaded. The dialog box may prevent a page to be fully loaded. The correct solution would be to:
_IENavigate the page without waiting for the page to fully load
Wait until the dialog box appears and close it
Wait for the page to fully load
The parameters for _IENavigate are like this, and you need to set $f_wait to 0:
_IENavigate(ByRef $o_object, $s_url [, $f_wait = 1])
To wait for the dialog box to appear, you will probably simply repeatedly attempt to click it until the ControlClick function returns it did so successfully.
From the Displays pane in System Preferences, I can manually change the main monitor by dragging the menu bar from one display to the other. I'd like to automate this and make it part of an AppleScript.
The tool I wrote, displayplacer, does this.
Configure your screens how you like, drag the "white bar" to your primary screen in the macOS system settings, and then execute displayplacer list. It will output the command to run to put your screens in their current configuration. The screen with origin:(0,0) is the main display with the "white bar". Run this terminal command through a script, Automator, BetterTouchTool, etc.
Example profile 1 puts the white bar on the menu bar on the left monitor.
displayplacer "id:<leftScreenId> res:1920x1080 scaling:on origin:(0,0) degree:0" "id:<rightScreenId> res:1920x1080 scaling:on origin:(1920,0) degree:0"
Example profile 1 puts the white bar on the menu bar on the right monitor.
displayplacer "id:<leftScreenId> res:1920x1080 scaling:on origin:(1920,0) degree:0" "id:<rightScreenId> res:1920x1080 scaling:on origin:(0,0) degree:0"
Also available via Homebrew brew tap jakehilborn/jakehilborn && brew install displayplacer
The displays are controlled by the /Library/Preferences/com.apple.windowserver.plist preference file:
A flag controls whether the main display is the onboard screen the DisplayMainOnInternal key.
The DisplaySets key contains the list of the display sets. The first set is the one used (fact to check).
In the set, each item contains the screen properties. The IOFlags key seems to indicate if the display is the main one (value of 7) or not (value of 3).
Before going Apple Script, you may change the display configuration by hand, and save a copy of the /Library/Preferences/com.apple.windowserver.plist file to study it.
Note that the following procedure has not been tested !!!
With AppleScript, the keys in the plist file are changed individually, in order to change the main display:
Make a backup of the /Library/Preferences/com.apple.windowserver.plist (in case of)
Alter the display set the select the main display (DisplaySets and IOFlags keys) by using the defaults command
Restart the Window Server: killall -KILL SystemUIServer
You should see if you can do it via AppleScript's User Interface Scripting. It allows you to manipulate an application's GUI elements; useful when the app doesn't support scripting directly. I'd test it myself but I don't have any extra displays lying around.
Here's a pretty good overview by MacTech.
Much like you can tell System Events.app to sleep your Mac, you can tell Image Events.app to mess with your displays. The Image Events application provides a "displays" collection. Each display has a "profile" with lots of goodies. However, everything I just mentioned is read-only, so I don't have a good way to do it from within script.
You might have better luck in Automator – Hit record, run System Preferences, go to Displays, drag the menu bar to the other screen, and hit stop. I bet something will work.
Using AppleScript, you can invoke default to write the setting to change the main monitor.