Activate a session via Gui scripting
Hi,
how to activate an active SAP-session via Gui Scripting or maybe a workaround?
There are some SAP sessions running and I want to activate a certain one of them.
I tried to activate a session with:
AppActivate session.findById("wnd[0]").Text
but, as we know, if there are the same task names in Task Manager, the function will start any one of them.
Any idea?
Edited by: Stefan Benkö on Feb 9, 2009 7:07 AM
Dear Casmir,
I use the following code:
suFound = False
suError = False
sgSystem = Trim(Cells(Target.Row, scSysCol))
sgClient = Trim(Cells(Target.Row, scCliCol))
sgUser = Trim(Cells(Target.Row, scUsrCol))
sgPW = Trim(Cells(Target.Row, scPwdCol))
suError = True
suError = Not ssApplication
If suError Then GoTo StopSub
For Each suConnection In sgApplication.Connections
suSysName = suConnection.Description
If suSysName = sgSystem Then
For Each suSession In suConnection.sessions
suSysClient = suSession.info.client
If suSysClient = sgClient Then
AppActivate suSession.findById("wnd[0]").Text
'Aktive Instanz herausfinden, SID/Client checken
Set suAkt = sgApplication.ActiveSession()
suAktName = suAkt.Parent.Description
suAktClient = suAkt.info.client
If sgSystem <> suAktName Or sgClient <> suAktClient Then
If Not suFound Then
suFound = True
AppActivate "Microsoft Excel"
A = MsgBox(sgSystem & " - " & sgClient & " NOT selectable", vbOKOnly + vbCritical + vbDefaultButton1, "SAP Automation")
End If
Else
suFound = True
End If
Exit For
End If
suSysClient = ""
Next
End If
If suFound Then Exit For
suSysName = ""
Next
As you can see, I got at that point all the necessary session and connection data.
There are several SAP-Tasks open and what I want is to get a specific one as active window on my screen. That doesn't work if the sessions have the same Task-name, for instance "SAP Easy Access". Because Windos is not albe to find the right SAP-task - they have the same name - and it takes usally the wrong one of them. Thats my problem.
Many Thanks for your Help
Similar Messages
-
Click every element in a window via GUI Scripting
Hi, I'd like to iterate through every element on an iTunes window and try to click on each element.
I'd also like to write to a text file showing each element that I've clicked.
The code that I wrote below isn't working. Specifically, I get the error *process "iTunes" doesn’t understand the clickanelement message.*
Thoughts on what I'm doing wrong?
Thanks!!
tell application "iTunes" to activate
tell application "System Events"
tell process "iTunes"
set elements to get entire contents of window "iTunes"
repeat with i from 1 to (length of elements)
set ele to item i of elements
clickanelement(ele)
showwhat_youclicked(ele)
end repeat
end tell
end tell
-------handlers------------
to clickan_element(anelement)
tell application "iTunes" to activate
tell application "System Events"
tell process "iTunes"
try
click an_element
end try
end tell
end tell
end clickanelement
to showwhat_you_clicked(thing_totype)
tell application "TextEdit" to activate
tell application "System Events"
tell process "TextEdit"
keystroke thingtotype
key code 36
end tell
end tell
end showwhat_youclickedI don't know what you're trying to do, but Welcome to Apple Discussions!
You can started like this, but I think the first click is going to close the iTunes window!
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
tell application "iTunes" to activate
tell application "System Events"
tell process "iTunes"
set elements to get entire contents of window "iTunes"
repeat with anElement in elements
try
click anElement
end try
end repeat
end tell
end tell
end </pre> -
Need help with GUI Scripting Audio Midi Setup
I want to read the value of the sampling frequency set by default in Audio Midi Setup.
If there is an easy unix way to gleen this, please let me know. Otherwise, I am trying to get it via GUI scripting. I think I am almost there, but am doing something stupid.
Here is what I have:
tell application "Audio MIDI Setup"
activate
end tell
tell application "System Events"
activate
tell application process "Audio MIDI Setup"
select window 1
select group
select tab group
select group
select combo box
set FrequencyValue to contents of combo box
end tell
end tell
Basically, this comes down to the question of how to extract the default text field from the combo box.Once you click on the combo box to get the list of items, you can do stuff with the results. The easiest thing would probably be to use the up and down arrows to change the selection, since the text field is not editable. You can compare the list of items with the current value and do something from there - how do you plan to choose the item to change to?
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
tell application "Audio MIDI Setup" to activate
tell application "System Events" to tell application process "Audio MIDI Setup"
set comboBox to combo box 1 of group 1 of tab group 1 of group 1 of window "Audio Devices"
set frequencyValue to value of comboBox -- get current value
click button 1 of comboBox -- perform action "AXPress" to drop the list
set theChoices to value of text fields of list 1 of scroll area 1 of comboBox -- get all the values
-- keystroke (ASCII character 31) -- down arrow
-- keystroke (ASCII character 30) -- up arrow
-- keystroke return -- select and dismiss the list
end tell
activate me
choose from list theChoices default items {frequencyValue} -- just show the results
</pre> -
Enabling GUI scripting via AppleScript
So I have a launch-daemon that needs to utilize GUI scripting. I need to be able to enable it through AppleScript (or really any scriptable, automated means). I am trying to do this:
tell application "System Events" to if not UI elements enabled then
set UI elements enabled to true
return UI elements enabled
end if
but it doesn't seem to do anything. The return query is just to check that it worked, but it never does. I have tried saving the script and running it as administrator (sudo osascript myScript.scpt) but it still doesn't work. I never get prompted for admin credentials. This occurs when logged in as administrator or non-admin user. Any ideas?tell application "System Events"
set UI elements enabled to true
end tell
tell application "System Events"
return UI elements enabled
end tell
The second part is just to test what the current setting it. It always stays false. -
GUI scripting question -am I sunk?
Hi all,
I am working on an Applescript to bring up two different non-Applescript-able applications (ie. ones w/o a dictionary) and am getting the error:
NSReceiverEvaluationScriptError : 4 from Applescript.
I have "Enable access for assitive devices" checked in SystemPreferences and am GUI scripting.
Here's the snippet of code that gives the error:
tell application "System Events"
if UI elements enabled then
activate application "TRx Recorder"
tell button " Record " of tool bar 1 of window "TRx Recorder"
click
end tell
end if
end tell
I generated the code "tell button ..." from the Prefab's UI Browser.
I've tried clicking via the name of the button, and via the position of the button. Same error.
Does this mean I'm sunk and can't get the app to respond to my Applescript?
When I select the Action of button " Record " from within the UI Browser, it works fine.
What am I doing wrong?
Thanks!
EdHi Camelot,
Yes indeed I needed a "tell process ..." block, as well as, 2 extra spaces in the label for the Record button.
I got the following to work:
tell application "System Events"
if UI elements enabled then
activate application "TRx Recorder"
tell process "TRx Recorder"
click button " Record " of tool bar 1 of window "TRx Recorder"
end tell
end if
end tell
I dug around using UI Browser and discovered that I needed 2 blanks in front of and 2 blanks behind of the label "Record" to correctly access the button. I originally had 1 space in front of Record and 1 space after Record within the quotes. With only 1 space I get the Applescript error I mentioned. With 2 I don't get the error.
Many thanks for the tip, it made me look closer at the labels of the buttons in UI Browser.
Ed -
SAP GUI Scripting Wizzard Windows7 does not work
Dear Experts,
I am quite a novice when it comes to SAP GUI scripting (let alone any other development), therefore my question might be rather stupid. After my PC was migrated from XP to Windows 7 it is no longer possible to use the SAP GUI scripting wizzard. When you select it from the menue, simply nothing happens.
Does anyone have an idea what I need to do to have this useful tool back on my PC?
We are running SAP GUi 7.1
Thanks for your help
TheoHere is SAP GUI wizard replacement tool...its in auto IT - enjoy
http://www.autoitscript.com/forum/topic/149540-sapwizardudf/
I had the tech guys here install , the latest GUI patch level 15,
and the script development tools not working issue has been fixed
They (SAP?) removed the 'script development tools' menu option!?
I have not installed the MS hotfix, but
My question is, it true the 'Script development tools' is gone?
Other methods
a) This (free) non SAP solution seems to work however...any other ideas?
Scripting Tracker Lite
http://scn.sap.com/docs/DOC-32728
b) The Activate GuiXT tool in SAP GUI also does give you some clues in the element window
and could be an alternative way , to get control names.
eg a radio button is R[P_CONTROL_ID] when it should be radP_CONTROL_ID
c) The SAP script recording and playback , to a vbs script will give you the control names also, if you edit the script.
You must of course have GUI scripting on in rz11
I can't read this note https://service.sap.com/sap/support/notes/1633639 - need a password! -
Hi All, -
Can somebody tell me, how can I use a variable instead of hardcoded value into a SAP GUI script?
Because the recorded file is a vbs-file, I have tried to declare a variable as usual:
Dim Count As Integer
Count = 58
But when I try to execute the updated script, even without assigning the Count variable to any places from the script, an error occurs u2013 u2018expected end of statementu2019 (the same error also occurs if I use Count instead of 58). Actually I want to replace all occurrences of number 58 in the script below. Can anybody help me?
Thanks,
Svetlana
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").contextMenu
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").currentCellColumn = "DATA"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").contextMenu
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").modifyCell 0,"DATA","M_FORMOFADDR"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").insertRows "58"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").modifyCell 58,"PNAME","M_FORMOFADDR"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").modifyCell 58,"PTYP","I"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").setCurrentCell 58,"PTYP"
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").firstVisibleRow = 53
session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").pressEnter
Edited by: Svetlana Balinova on Jul 21, 2009 3:12 PM
Edited by: Svetlana Balinova on Jul 21, 2009 3:13 PMHi Svetlana,
if I have understood correctly, could it be that the following link you could use a bit:
Referencing a variable in 'session findbyId' command (SAP GUI Scripting)
Regards,
ScriptMan -
Automatic graphic switch via Apple Script
hi community,
I would like to change the "Automatic graphics switching" (tick on / tick off) via an Apple Script. I made the following script and it works, except with line "click chckbox 2". Here it ticks the box "Show battery status in menu bar". With "click checkbox 1" it takes the "Lock-Button".
I would be glad if anybode could tell me the right code for ticking the checkbox "automatic graphics switching" via Apple Script.
Thanks a lot
PS: Yes I know that tool gfx Status, but I wanna do this via Apple Script.
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.energysaver"
delay 0.5
tell application "System Events"
tell process "Systemeinstellungen"
tell window "Energie sparen"
click checkbox 2
delay 0.5
end tell
end tell
end tell
quit
end tell
quitHello
You may try this. It works with MacBook Pro 2010 under 10.6.5.
tell application "System Preferences"
set current pane to pane id "com.apple.preference.energysaver"
end tell
tell application "System Events"
tell process "System Preferences"
tell window 1
tell group 1 -- automatic graphics switching
tell checkbox 1 -- automatic graphics switching
click
end tell
end tell
end tell
end tell
end tell
And the script below will set the option to the specified value.
set_automatic_graphics_switching(0)
on set_automatic_graphics_switching(i)
integer i : status of automatic graphics switching
0 : off (unchecked)
1 : on (checked)
if i is not in {0, 1} then error "Invalid argument: " & i number 8000
tell application "System Preferences"
set _was_running to running
set current pane to pane id "com.apple.preference.energysaver"
end tell
tell application "System Events"
tell process "System Preferences"
tell window 1
tell group 1 -- automatic graphics switching
tell checkbox 1 -- automatic graphics switching
if value ≠ i then click
end tell
end tell
end tell
end tell
end tell
if not _was_running then
tell application "System Preferences" to quit
end if
end set_automatic_graphics_switching
Hope this may help,
H -
Calling GUI Scripting from ABAP program
Is it possible to call GUI Scripting from ABAP and thus to use GUI Scripting as an alternative to CALL TRANSACTION?
Is the class CL_JAVA_SCRIPT suitable to access GUI Scripting engine? Accessing ABAP data object would work as well in this case as i think. What SAP Logon and WAS releases are required? Is the 6.20 release sufficient for this case?
I would appreciate if somebody could post an example.Hi,
CL_JAVA_SCRIPT has nothing to do with SAPGUI Scripting.
Calling SAPGUI Scripting API from ABAP could be possible for programmes experienced with OLE automation calls from ABAP coding.
The hardest thing will be, to access the scripting engine handle as an entry point. Once you have a handle in your abap session, any api function can be invoked.
Best regards
Jens
BTW: SAP testtool eCATT does call SAPGUI-Scripting from ABAP. -
AppleScript GUI scripting problem.
Hi All,
I've created a script that will automatically open new document in Indesign CS2. But when i run the script i'm getting system events error as "NSReceiverEvaluationScriptError: 4". I tried following the instruction given in forums but still couldn't figure out. Below is the script i wrote. Can any one tell where and what i'm missing.
tell application "Adobe InDesign CS2" to activate
tell application "System Events"
tell process "Adobe InDesign CS2"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
tell menu item "New"
tell menu "New"
click menu item "Document"
end tell
end tell
end tell
end tell
end tell
click button "Ok" of window 1
end tell
end tell
This is the submenu of menu New. This might be the problem cos the below script works for for which i'm clicking the menu not sub menu
tell application "Adobe InDesign CS2" to activate
tell application "System Events"
tell application process "Adobe InDesign CS2"
tell menu bar 1
tell menu bar item "Help"
tell menu "Help"
click menu item "Welcome Screen..."
end tell
end tell
end tell
end tell
end tell
My Mac version 10.4.10
Any help would be appreciated.
-JacinthaUsing GUI scripting is the road to madness; it's for emergency use only.<br />Try:<br /><br />tell application "Adobe InDesign CS2"<br />make document<br />end tell<br /><br />-- <br />Shane Stanley <[email protected]>
-
Executing SAP GUI Script From a Web Page
I have an issue when trying to execute some javascript (sap gui script) from a webpage.
When the javascript is executed I get the message:
automation server unable to create object.
However, this exact same javascript when placed in a text file and double-clicked executes just fine through the windows scripting host.
Does anyone have an example of gui script code executing from a webpage? Or any ideas on why it isn't working from the webpage? Both scenarios should be executing the code on the local machine through WSH.
Below is the javascript as well as the webpage executing the javascript:
SAPGUI SCRIPT
if (typeof(application) == "undefined")
sapgui = GetObject("SAPGUI");
application = sapgui.GetScriptingEngine;
if (typeof(connection) == "undefined")
connection = application.children(0);
if (typeof(session) == "undefined")
session = connection.children(0);
if (typeof(WScript) != "undefined")
WScript.connectObject(session, "on");
WScript.connectObject(application, "on");
session.findById("wnd[0]").maximize();
session.findById("wnd[0]/tbar[0]/okcd").text = "/nzsd1067";
session.findById("wnd[0]").sendVKey(0);
session.findById("wnd[0]/usr/ctxtVBAK-KUNNR").text = "6343";
session.findById("wnd[0]").sendVKey(0);
WEBPAGE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<! INPUT PARAMETER SETTINGS:
To Push data to Siebel or SAP the appropriate
field below must be set = TRUE.
Pop_SAP
Pop_Siebel
SIEBEL INPUT PARAMETER: When
Pushing data to a Siebel screen the Query_Type should be set based on the type
of lookup that is requested.
Query_Type = 'SAP' -presents a screen based on a customer SAP Id.
Query_Type = 'SR' -presents a screen based on a Service Request.
Query_Type = '' or null -presents a search screen to locate the proper contact in Siebel
APP_SAP_ID -SAP customer Id
APP_SR_NUM -Siebel Service Request Number
>
<SCRIPT LANGUAGE="VBScript">
Sub LoadContact()
'Siebel Application Object
Dim siebApp 'As SIEBELHTMLLib.ISiebelHTMLApplication
Dim siebSvcs 'As SIEBELHTMLLib.ISiebelService
Dim siebOutputPropSet 'As SIEBELHTMLLib.ISiebelPropertySet
Dim siebInputPropSet 'As SIEBELHTMLLib.ISiebelPropertySet
Dim bool 'As Boolean
Dim errCode 'As Integer
Dim errText 'As String
Dim QueryType 'As String
Dim PopSAP 'As String
PopSiebel = "TRUE"
If PopSiebel = "TRUE" Then
QueryType = "SAP"
If QueryType = "null" Then
QueryType = ""
End If
'Create The SiebelHTML Object
set siebApp = CreateObject("SiebelHTML.SiebelHTMLApplication.1")
If Not siebApp Is Nothing Then
'Create A New Property Set
set siebInputPropSet = siebApp.NewPropertySet
set siebOutputPropSet = siebApp.NewPropertySet
If Not siebInputPropSet Is Nothing Then
siebInputPropSet.SetProperty "ANI", "9738986011"
siebInputPropSet.SetProperty "SAP_ID", "0000516616"
siebInputPropSet.SetProperty "SR_NUM", "null"
siebInputPropSet.SetProperty "Interaction_ID", "168608840053"
siebInputPropSet.SetProperty "Query_Type", QueryType
Else
errCode = siebApp.GetLastErrCode
errText = siebApp.GetLastErrText
MsgBox "Could not Create Siebel Property Set: " & errCode & "::" & errText
End If
'Get A Siebel Service
set siebSvcs = siebApp.GetService ("TAWBS")
If Not siebSvcs Is Nothing Then
siebSvcs.InvokeMethod "TAWPresentAccount", siebInputPropSet, siebOutputPropSet
Else
errCode = siebApp.GetLastErrCode
errText = siebApp.GetLastErrText
MsgBox "Could not Get Siebel Service: " & errCode & "::" & errText
End If
set siebApp = Nothing
End If
set siebInputPropSet = Nothing
set siebOutputPropSet = Nothing
set siebSvcs = Nothing
End If
End Sub
</SCRIPT>
<SCRIPT LANGUAGE="javascript">
function loadSAP()
if (typeof(application) == "undefined")
sapgui = GetObject("SAPGUI");
application = sapgui.GetScriptingEngine;
if (typeof(connection) == "undefined")
connection = application.children(0);
if (typeof(session) == "undefined")
session = connection.children(0);
if (typeof(WScript) != "undefined")
WScript.connectObject(session, "on");
WScript.connectObject(application, "on");
session.findById("wnd[0]").maximize();
session.findById("wnd[0]/tbar[0]/okcd").text = "/nzsd1067";
session.findById("wnd[0]").sendVKey(0);
session.findById("wnd[0]/usr/ctxtVBAK-KUNNR").text = "0000516616";
session.findById("wnd[0]").sendVKey(0);
} // end
</SCRIPT>
</head>
<body onload="loadSAP()">
<H3><FONT face="Arial" size="5">Raytheon Integration Screen</FONT></H3>
<HR style="WIDTH: 882px; HEIGHT: 8px" color="#3366cc" SIZE="8">
<form id="ValidForm" onsubmit="LoadContact(); return false;" language="jscript">
<FONT face="Arial">Load Siebel Screen</FONT> <! <input name="Text1" TYPE="TEXT"
SIZE="10" ID="Text1"> <input name="Submit" TYPE="submit" VALUE="Submit" ID="Submit1">
</form>
<form id="Form1" onsubmit="loadSAP(); return false;" language="javascript">
<FONT face="Arial">Load SAP Screen</FONT> <! <input
name="Text2" TYPE="TEXT" SIZE="10" ID="Text2"> <input name="Submit" TYPE="submit" VALUE="Submit" ID="Submit2">
</form>
</body>
</html>Hi Bernd,
the following code works in VBS. If you run saplogon.exe you'll get a message box saying '/app'.
Set Wrp = CreateObject ("SapROTWr.SapROTWrapper")
Set SapGui = Wrp.GetROTEntry ("SAPGUI")
Set application = sapgui.GetScriptingEngine
MsgBox application.id
I haven't tried it on a web page, but I don't see why it shouldn't work there. Ok, maybe the MsgBox is command is not available.
Best regards,
Christian -
How to activate save session when closing multiple tabs?
i've opened many tabs that i want. When I close Firefox there are many tabs. Those tabs have to be restored when i open again Firefox. how to activate in firefox 4.o. In firefox 3.6 it is asking defaultly to save sessions.
In Firefox 4 you can always restore the previous session via Firefox > History > Restore Previous Session
You can set the warn prefs on the about:config page to true via the right-click context menu or toggle with a double left-click.
* browser.showQuitWarning, see http://blog.zpao.com/post/3174360617/about-that-quit-dialog
* browser.tabs.warnOnClose, see http://kb.mozillazine.org/About%3Aconfig_entries
* browser.warnOnQuit , see http://kb.mozillazine.org/browser.warnOnQuit
* browser.warnOnRestart , see http://kb.mozillazine.org/browser.warnOnRestart
To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
If you see a warning then you can confirm that you want to access that page.<br />
* http://kb.mozillazine.org/about%3Aconfig -
Create Oracle OCI JDBCConnectionPool via silent script
Hi there,
I'm currently trying to create a JDBCConnectionPool via silent script that uses the Oracle OCI thick driver. My silent script looks like this:
create JDBCConnectionPool "MyPool" as jdbcpool;
set jdbcpool.DbmsHost "myhost";
set jdbcpool.DbmsPort "1521";
set jdbcpool.Password "user";
set jdbcpool.URL "jdbc:oracle:oci:@//myhost:1521/mysid";
set jdbcpool.DriverName "oracle.jdbc.pool.OracleDataSource";
set jdbcpool.Properties "user=user;portNumber=1521;SID=mysid;serverName=myhost;dll=ocijdbc9;protocol=oci";
The log of the silent script says everything was set successfully. Unfortunately when I take a look at the "Connection Pools" at the GUI admin console, the URL for the jdbcpool has been changed to "jdbc:bea:oracle:///myhost:1521" !
I'm using WebLogic 8.1SP3 with Oracle 9.2.0.5!
Can anyone help me with this? Any hint/help is appreciated!
- razeHi Joe,
I've done a demo script that produces the described "error". Would be great if you (or anybody else) could check if the same behaviour occurs.
[... start script ...]
read template from "/opt/bea/8.1.SP3/user_home/common/templates/domains/wls.jar";
create Cluster "MyCluster" as c1;
set c1.ClusterAddress "127.0.0.1:59251";
set c1.MulticastAddress "237.0.0.1";
set c1.MulticastPort "59251";
find Server "myserver" as s1;
set s1.Name "AdminServer";
set s1.ListenAddress "";
set s1.ListenPort "59261";
set s1.HostnameVerificationIgnored "true";
set s1.SSL.Enabled "true";
set s1.SSL.ListenPort "59262";
create Server "ManagedServer" as n1;
set n1.ListenAddress "";
set n1.ListenPort "59251";
set n1.Cluster "MyCluster";
set n1.HostnameVerificationIgnored "true";
set n1.Machine "MyMachine";
set n1.SSL.Enabled "false";
create UnixMachine "MyMachine" as machine1;
set machine1.NodeManager.ListenPort "59255";
set machine1.NodeManager.Name "MyMachine";
create JDBCConnectionPool "MyPool" as jdbcpool;
set jdbcpool.DbmsName "user";
set jdbcpool.Password "user";
set jdbcpool.Properties "user=user;portNumber=1521;SID=db-sid;serverName=db-host;dll=ocijdbc9;protocol=oci";
set jdbcpool.URL "jdbc:oracle:oci:@//db-host:1521/db-sid";
set jdbcpool.DriverName "oracle.jdbc.pool.OracleDataSource";
assign JDBCConnectionPool "*" to target "MyCluster";
find User "weblogic" as u1;
set u1.password "weblogic";
set OverwriteDomain "true";
write domain to "/home/user/BeaDomain";
close template;
[... end script ...]
Setting the URL succeeds as the log says:
[runScript] com.bea.plateng.domain.script.ScriptExecutor - set jdbcpool attribute URL to "jdbc:oracle:oci:@//db-host:1521/db-sid"
[runScript] com.bea.plateng.domain.script.ScriptExecutor - succeed: set jdbcpool attribute URL to "jdbc:oracle:oci:@//db-host:1521/db-sid"
But nevertheless the "config.xml" of the created domain contains the following entry:
<JDBCConnectionPool Name="MyPool" Targets="MyCluster"
DriverName="oracle.jdbc.pool.OracleDataSource"
Password="{3DES}Zlf46kqr6QE=" Properties="" URL="jdbc:bea:oracle:///db-host:1521"/>
Thus I assume when writing the domain, the URL gets changed for some reason. I also tried to increase the log level by executing the script with the options "-log_priority=debug -silent_priority=debug", but that did not help to find out why the URL got changed.
Is there maybe someone already using the Oracle OCI thick driver successfully and could post/email me the used silent script?
Greetings,
raze -
Feature activation via GUI works fine on every level, but not via PowrShell
Hi *,
I have experiencing an issue with my PowerShell installation scripts. The script for activating the features (web, site and web application level) goes through without any error, not event in logs or ev. viewer but the features (that seem activated) don't
have the functionality added completely, meaning: the feature that creates the list, ct, fields creates them right but does not pick up the resource files; the features for pages modifies the default page but does not add the other pages to the Pages library.
Some features don't seem to get activated at all, they state Activated but the functionality is missing.
In the code I have tried logging all the error thrown, but nothing came up. I have no references to SPContext.Current or HttpContext in the feature event receivers, I run PowerShell with admin rights.
Also when I try to add items to a list via PowerShell, no event receivers on the given list are executed.
Also if I activated the features from SharePoint UI everything settles just fine and I have my application running as expected. Even if I activate the features via UI the adding of item from PowerShell does not trigger the event receivers. Adding the item
from UI triggers the event receivers.
Any idea is greatly appreciated.
Thank you,
Anisia Pophi
it may happen if your Windows default language is not the same as language of Sharepoint site and resources which you try to use on it. In this case Powershell thread's language will use OS language and feature receiver will be executed under this language.
From other side when you activate the feature from UI, feature receiver's thread has language of the site on which it is activated (Sharepoint automatically sets thread's language to the language of accessed site, see e.g.
How Sharepoint sets CurrentThread.CurrentUICulture depending on Language of SPWeb). As workaround try explicitly set language of the current thread in PowerShell before to activate the feature.
Blog - http://sadomovalex.blogspot.com
Dynamic CAML queries via C# - http://camlex.codeplex.com -
Hi there,
I'm trying to script a small app called Deeper (that doesn't work natively with ascript).
I tried GUI scripting with apple script editor but I'm not how it works so I put that aside and went trying with UI Element Inspector.
So I'm trying to select something from a scroll menu, and then click a start button.
What it does is it activates the Flurry screensaver as a background, but some bugs turn it off, so I wanted that by running this script, it would use Deeper to turn it back on without having to do it manually.
I tried as best as I can to stick with the example given in the UIElementInspector page, but I am really a starter in scripting.
First, I did:
tell application "Deeper"
activate
end tell
tell application "System Events"
tell process "Deeper"
tell menu "PopUpButton"
But then I found out there was no way to distinguish that pop up menu from others (with UIElementInspector) other than by the size and location of the menu in the app.
So first I'd need help finding out how to tell the script wich menu to go check in, and then probably stick with the example page.
As you can see, I'll really trying to learn applescript from the start, because it looks so useful.
Thanks to anyone for helping!You shouldn't need this:
"open application file "Deeper.app" of folder "Applications" of startup disk"
as this activates your app for you:
"activate application "Deeper""
activate application "Deeper"
delay 1
tell application "System Events"
tell process "Deeper"
click button "General" of tool bar 1 of window "Deeper"
delay 0.5
tell pop up button 4 of window "Deeper"
click
click menu item "Flurry" of menu 1
end tell
delay 0.5
click button "Start" of window "Deeper"
delay 0.5
tell application "Finder"
quit application "Deeper"
end tell
end tell
end tell
Budgie
Maybe you are looking for
-
Hi, Guys, I really need help in trying to learn what J2EE is. I've got prior knowledge and experience on Java (I thought), but ever since I came across the terms J2EE, EJB, JNI, JSP, JDBC and all that crap, I now don't know what I actually learnt! Pl
-
"Real" delivery times for iPhone 4 in HK ?
Hi there, my iPhone got stolen today, but incidentally, a while ago, I had ordered an iPhone for a friend who won't be back for another 4 weeks, and this one arrived today. So I am contemplating to use this one for myself and ordering a new one for h
-
Can I use my electric piano on GarageBand
Can I use my electric piano on GarageBand? What cables do I use? What do I click on in the app?
-
My genius recommendations have not updated in 3 months in the Itunes store so clearly they no longer care to sell music. Does anyone know of a manual way to update the recommendaions? Thx
-
Recent iPod Undater will not install.
I recently downloaded the latest (6/28/06) iPod Software Update. Last night when I connected my 4G iPod Nano to my G5 iMac I got the message saying there was updated software available and do I want to update now. I clicked update and was brought to