Sendkeys to PS via .js script
Hello,
I want to call a recorded action thru a custom panel button (the action to call is a plugin-function, which I cant access thru the panel configurator) .So I assigned shortcut-keys for this action and these should be send to PS thru a .js script.
This is my code for testing:
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.AppActivate("PS");
WScript.Sleep(300);
WshShell.SendKeys("{F1}");
When I run the script with cscript.exe (WINDOWS 8), then the PS Window gets activated, but apparently no "F1" Key is sent, because no new window opens.
Can you help me, please?
it would be, but this does not work in this case.
I cant record the action - which is a plugin-function - whithout its instant execution - that is - i want the action just to open the menu of the plugin, but not its instant excecution - when replaying the action.
Your plan works with some functions, but not in any case.
So I added shortcuts for these and these shortcuts just open the menu of the plugins - so sending keys with a script would probably do it.
Similar Messages
-
Webserver on DMZ cannot send email via php script using SMTP (cisco firewall pix 515e)
Hello,
I have two web servers that are sitting in a DMZ behind a Cisco Firewall PIX 515e. The webservers appear to be configured correctly as our website and FTP website are up. On two of our main website, we have two contact forms that use a simple html for to call a php script that uses smtp as its mailing protocol. Since, I am not the network administrator, I don't quite understand how to read the current configurations on the firewall, but I suspect that port 25 is blocked, which prevents the script from actually working or sending out emails. What I've done to narrow the problem done is the following: I used a wamp server to test our scripts with our smtp servers settings, was able to successfully send an email out to both my gmail and work place accounts. Currently, we have backupexec loaded on both of these servers, and when I try to send out an alert I never receive it. I think because port 25 is closed on both of those servers. I will be posting our configuration. if anyone can take a look and perhaps explain to me how I can change our webservers to communicate and successfully deliver mail via that script, I would gladly appreciate it. our IP range is 172.x.x.x, but it looks like our webservers are using 192.x.x.x with NAT in place. Please someone help.
Thanks,
Jeff Mateo
PIX Version 6.3(4)
interface ethernet0 100full
interface ethernet1 100full
interface ethernet2 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 DMZ security50
enable password GFO9OSBnaXE.n8af encrypted
passwd GFO9OSBnaXE.n8af encrypted
hostname morrow-pix-ct
domain-name morrowco.com
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 12.42.47.27 LI-PIX
name 172.20.0.0 CT-NET
name 172.23.0.0 LI-NET
name 172.22.0.0 TX-NET
name 172.25.0.0 NY-NET
name 192.168.10.0 CT-DMZ-NET
name 1.1.1.1 DHEC_339849.ATI__LEC_HCS722567SN
name 1.1.1.2 DHEC_339946.ATI__LEC_HCS722632SN
name 199.191.128.105 web-dns-1
name 12.127.16.69 web-dns-2
name 12.3.125.178 NY-PIX
name 64.208.123.130 TX-PIX
name 24.38.31.80 CT-PIX
object-group network morrow-net
network-object 12.42.47.24 255.255.255.248
network-object NY-PIX 255.255.255.255
network-object 64.208.123.128 255.255.255.224
network-object 24.38.31.64 255.255.255.224
network-object 24.38.35.192 255.255.255.248
object-group service morrow-mgmt tcp
port-object eq 3389
port-object eq telnet
port-object eq ssh
object-group network web-dns
network-object web-dns-1 255.255.255.255
network-object web-dns-2 255.255.255.255
access-list out1 permit icmp any any echo-reply
access-list out1 permit icmp object-group morrow-net any
access-list out1 permit tcp any host 12.193.192.132 eq ssh
access-list out1 permit tcp any host CT-PIX eq ssh
access-list out1 permit tcp any host 24.38.31.72 eq smtp
access-list out1 permit tcp any host 24.38.31.72 eq https
access-list out1 permit tcp any host 24.38.31.72 eq www
access-list out1 permit tcp any host 24.38.31.70 eq www
access-list out1 permit tcp any host 24.38.31.93 eq www
access-list out1 permit tcp any host 24.38.31.93 eq https
access-list out1 permit tcp any host 24.38.31.93 eq smtp
access-list out1 permit tcp any host 24.38.31.93 eq ftp
access-list out1 permit tcp any host 24.38.31.93 eq domain
access-list out1 permit tcp any host 24.38.31.94 eq www
access-list out1 permit tcp any host 24.38.31.94 eq https
access-list out1 permit tcp any host 24.38.31.71 eq www
access-list out1 permit tcp any host 24.38.31.71 eq 8080
access-list out1 permit tcp any host 24.38.31.71 eq 8081
access-list out1 permit tcp any host 24.38.31.71 eq 8090
access-list out1 permit tcp any host 24.38.31.69 eq ssh
access-list out1 permit tcp any host 24.38.31.94 eq ftp
access-list out1 permit tcp any host 24.38.31.92 eq 8080
access-list out1 permit tcp any host 24.38.31.92 eq www
access-list out1 permit tcp any host 24.38.31.92 eq 8081
access-list out1 permit tcp any host 24.38.31.92 eq 8090
access-list out1 permit tcp any host 24.38.31.93 eq 3389
access-list out1 permit tcp any host 24.38.31.92 eq https
access-list out1 permit tcp any host 24.38.31.70 eq https
access-list out1 permit tcp any host 24.38.31.74 eq www
access-list out1 permit tcp any host 24.38.31.74 eq https
access-list out1 permit tcp any host 24.38.31.74 eq smtp
access-list out1 permit tcp any host 24.38.31.75 eq https
access-list out1 permit tcp any host 24.38.31.75 eq www
access-list out1 permit tcp any host 24.38.31.75 eq smtp
access-list out1 permit tcp any host 24.38.31.70 eq smtp
access-list out1 permit tcp any host 24.38.31.94 eq smtp
access-list dmz1 permit icmp any any echo-reply
access-list dmz1 deny ip any 10.0.0.0 255.0.0.0
access-list dmz1 deny ip any 172.16.0.0 255.240.0.0
access-list dmz1 deny ip any 192.168.0.0 255.255.0.0
access-list dmz1 permit ip any any
access-list dmz1 deny ip any any
access-list nat0 permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255.0
access-list nat0 permit ip host 172.20.8.2 host 172.23.0.2
access-list nat0 permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
access-list nat0 permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
access-list nat0 permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
access-list vpn-split-tun permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255
.0
access-list vpn-split-tun permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.2
55.255.0
access-list vpn-dyn-match permit ip any 192.168.220.0 255.255.255.0
access-list vpn-ct-li-gre permit gre host 172.20.8.2 host 172.23.0.2
access-list vpn-ct-ny permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
access-list vpn-ct-ny permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
access-list vpn-ct-tx permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
access-list vpn-ct-tx permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
access-list static-dmz-to-ct-2 permit ip host 192.168.10.141 CT-NET 255.255.248.
0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.255.25
5.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
access-list static-dmz-to-ct-1 permit ip host 192.168.10.140 CT-NET 255.255.248.
0
access-list static-dmz-to-li-1 permit ip CT-DMZ-NET 255.255.255.0 CT-NET 255.255
.248.0
access-list vpn-ct-li permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
access-list vpn-ct-li permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
access-list vpn-ct-li permit ip host 10.10.2.2 host 10.10.1.1
access-list in1 permit tcp host 172.20.1.21 any eq smtp
access-list in1 permit tcp host 172.20.1.20 any eq smtp
access-list in1 deny tcp any any eq smtp
access-list in1 permit ip any any
access-list in1 permit tcp any any eq smtp
access-list cap4 permit ip host 172.20.1.82 host 192.168.220.201
access-list cap2 permit ip host 172.20.1.82 192.168.220.0 255.255.255.0
access-list in2 deny ip host 172.20.1.82 any
access-list in2 deny ip host 172.20.1.83 any
access-list in2 permit ip any any
pager lines 43
logging on
logging timestamp
logging buffered notifications
logging trap notifications
logging device-id hostname
logging host inside 172.20.1.22
mtu outside 1500
mtu inside 1500
mtu DMZ 1500
ip address outside CT-PIX 255.255.255.224
ip address inside 172.20.8.1 255.255.255.0
ip address DMZ 192.168.10.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool ctpool 192.168.220.100-192.168.220.200
ip local pool ct-thomson-pool-201 192.168.220.201 mask 255.255.255.255
pdm history enable
arp timeout 14400
global (outside) 1 24.38.31.81
nat (inside) 0 access-list nat0
nat (inside) 1 CT-NET 255.255.0.0 2000 10
nat (DMZ) 0 access-list nat0-dmz
static (inside,DMZ) CT-NET CT-NET netmask 255.255.0.0 0 0
static (inside,outside) 24.38.31.69 172.20.8.2 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.94 192.168.10.141 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.71 172.20.1.11 dns netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.93 192.168.10.140 netmask 255.255.255.255 0 0
static (DMZ,inside) 24.38.31.93 access-list static-dmz-to-ct-1 0 0
static (DMZ,inside) 24.38.31.94 access-list static-dmz-to-ct-2 0 0
static (inside,outside) 24.38.31.92 172.20.1.56 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.91 192.168.10.138 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.90 192.168.10.139 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.72 172.20.1.20 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.73 172.20.1.21 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.70 172.20.1.91 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.88 192.168.10.136 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.89 192.168.10.137 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.74 172.20.1.18 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.75 172.20.1.92 netmask 255.255.255.255 0 0
access-group out1 in interface outside
access-group dmz1 in interface DMZ
route outside 0.0.0.0 0.0.0.0 24.38.31.65 1
route inside 10.10.2.2 255.255.255.255 172.20.8.2 1
route inside CT-NET 255.255.248.0 172.20.8.2 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
aaa-server ct-rad protocol radius
aaa-server ct-rad max-failed-attempts 2
aaa-server ct-rad deadtime 10
aaa-server ct-rad (inside) host 172.20.1.22 morrow123 timeout 7
aaa authentication ssh console LOCAL
aaa authentication http console LOCAL
aaa authentication serial console LOCAL
aaa authentication telnet console LOCAL
http server enable
http 173.220.252.56 255.255.255.248 outside
http 65.51.181.80 255.255.255.248 outside
http 208.65.108.176 255.255.255.240 outside
http CT-NET 255.255.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server community m0rroW(0
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
sysopt connection permit-pptp
crypto ipsec transform-set 3des-sha esp-3des esp-sha-hmac
crypto ipsec transform-set 3des-md5 esp-3des esp-md5-hmac
crypto dynamic-map dyn_map 20 match address vpn-dyn-match
crypto dynamic-map dyn_map 20 set transform-set 3des-sha
crypto map ct-crypto 10 ipsec-isakmp
crypto map ct-crypto 10 match address vpn-ct-li-gre
crypto map ct-crypto 10 set peer LI-PIX
crypto map ct-crypto 10 set transform-set 3des-sha
crypto map ct-crypto 15 ipsec-isakmp
crypto map ct-crypto 15 match address vpn-ct-li
crypto map ct-crypto 15 set peer LI-PIX
crypto map ct-crypto 15 set transform-set 3des-sha
crypto map ct-crypto 20 ipsec-isakmp
crypto map ct-crypto 20 match address vpn-ct-ny
crypto map ct-crypto 20 set peer NY-PIX
crypto map ct-crypto 20 set transform-set 3des-sha
crypto map ct-crypto 30 ipsec-isakmp
crypto map ct-crypto 30 match address vpn-ct-tx
crypto map ct-crypto 30 set peer TX-PIX
crypto map ct-crypto 30 set transform-set 3des-sha
crypto map ct-crypto 65535 ipsec-isakmp dynamic dyn_map
crypto map ct-crypto client authentication ct-rad
crypto map ct-crypto interface outside
isakmp enable outside
isakmp key ******** address LI-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp key ******** address 216.138.83.138 netmask 255.255.255.255 no-xauth no-c
onfig-mode
isakmp key ******** address NY-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp key ******** address TX-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp identity address
isakmp nat-traversal 20
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption 3des
isakmp policy 10 hash sha
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
isakmp policy 30 authentication pre-share
isakmp policy 30 encryption 3des
isakmp policy 30 hash md5
isakmp policy 30 group 1
isakmp policy 30 lifetime 86400
vpngroup remotectusers address-pool ctpool
vpngroup remotectusers dns-server 172.20.1.5
vpngroup remotectusers wins-server 172.20.1.5
vpngroup remotectusers default-domain morrowny.comAmit,
I applaud your creativity in seeking to solve your problem, however, this sounds like a real mess in the making. There are two things I don't like about your approach. One, cron -> calling Java -> calling PHP -> accessing database, it's just too many layers, in my opinion, where things can go wrong. Two it seems to me that you are exposing data one your website (with the PHP) that you may not want expose and this is an important consideration when you are dealing with emails and privacy and so on.
I think the path of least resistance would be to get a new user account added to the MySQL database that you can access remotely with your Java program. This account can be locked down for read only access and be locked down to the specific IP or IP range that your Java program will be connecting from.
Again I applaud your creativity but truly this seems like a hack because of the complexity and security concerns you are introducing and I think is a path to the land of trouble. Hopefully you will be able to get a remote account set up. -
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 -
Access System Resources using Java Applet via Java Script
Hello
I can access my Applet public methods (and this methods access system resources) via Java Script if I do the following: System.setSecurityManager(null);However, I'm making this post because I don't like this solution.
Supposedly, setting the SM to null is like making the Applet (which is signed and was accepted by the user via a prompt from the browser) behave like a normal Java program that has no restrictions. (http://java.sun.com/docs/books/tutorial/essential/environment/security.html, second paragraph)
However, this feels like a workaround of something that is supposed to be there (the SM).
Also, if I make the methods invocation from inside the applet (using swing buttons and textboxes for example) I can use the standard SM without no problems.
From my readings, the problem regarding Java Script invocation, comes from the fact that the Java Script is not a secure (not signed) source (because you can invoke public methods the way you wish from it i guess) on the contrary to the applet methods invoked by the buttons.
Possible solutions I found in the web range from using the public static Object doPrivileged(PrivilegedAction action) method or imaginative things like creating new threads on the public method that call the private methods that access the system resources (supposedly because the new thread runs under the safe environment of the applet)
I almost got a glimpse of hope with this post http://forums.sun.com/thread.jspa?threadID=5325271&tstart=0
However, none of these solutions worked, the only results were with the setResourceManager(null)So, any one can contribute with a solution for this? Should I keep trying to find a solution other then the one I already have?
Regards
Cad1. yes
2. yes
Note for 2. the converter will run the applet with SUN jre for sure if the user has IE.
IE will use the ActiveX technology to run the applet (as with Macromedia Flash).
For Netscape I am not sure, but I would think Netsape will use the plug in provided by
SUN.
Note for SUN jre 1.3. If this applet is to be used within a company that uses a proxy with
ntlm authentication the 1.3 applet cannot connect (to the Internet) through this proxy since
ntlm athentication is supported since j2re1.4.2_03. There is one version before that but
that one will pop up a window asking for the user's domain account and password wich
is both lame and crappy.
As for the IE settings, IE has a default setting that askes users the "do you trust"
queston for AciveX controls within the Internet securety zone (tools -> internet options
-> security).
Sincy anybody can make ActiveX controls (allso sign them) a user that has a problem
to find the "no" button will sooner or later install a malicuous ActiveX control (spy ware
or a virus).
If this user's desktop is within your company's network it will cause serious harm.
This is why most company's disable this by changing the default internet expolorer
settings. Since I assume you are writhing this applet to be used by a company I allso
assumed that company has someone to maintain the desktops. In that case I
assume that person would want to control the security within the SUN jre instead of
letting the user deside what to trust and what not. -
Creating APEX pages via SQL scripts..
Hi Guys,
I want to create APEX pages via SQL Script. The main reason to have this option that I have couple of applications which has XML files for screen definition where I can read all screen properties (field types, sizes, caption, etc...)
Is there any documentation or help stuff where I can find the APEX page definition tables? I found something like WWV tables but I couldnt figure it out properly...
Any help ?
Thanks,
Osman...We have built our entire apex app in a similar way. We create the shell apex pages using apex (eg, Item Detail, Insert Item, etc.). Then we create a PL/SQL region on the page. The PL/SQL region simply calls a stored procedure to render the controls on the page. For example, our regions looks similar to this:
begin
apex_pkg.sp_render_page('ITEM_DETAIL',Param1,Param2,Param3);
end;
The sp_render_page procedure in the database generates the appropriate HTML for the page. This procedure reads meta data in the database (eg, field label, field size, field type, field position, etc.) and renders the same HTML that apex would render if the apex page was manually created. For example, in the procedure we use lines similar to these:
HTP.p(apex_item.text(...))
HTP.p(apex_item.select_list_from_query(...))
Because the procedure is reading meta data, the apex page is dynamic and can be different for different users or clients.
Darrin -
Load an Advanced Print Setting in Acrobat via Java-Script
Hi there,
I'd like to know, if there's a way to load an advanced print setting in the Acrobat via Java Script or some other way? (See Screenshot)
Or is it possible to set an created setting as default-setting? (also via Java or something)
Or can somebody tell me, where these created print settings are saved? (in Acrobat X)
Thank you very much for your help and sorry for my english, I hope you understand me. :-)
Kind regards
MankroWhy wouldn't you want to set itas part of an input/output parameter?
This is really the right way ofdoing this. Otherwise you'll end up with hardcoded variable name in your customcomponent and that not ideal.
If you're trying to define a default value for it coming from a properties file, you can just make it a "Configuration" variable and set the value from adminui.
Jasmin -
How to install roles and features via a script linked to an OU, to automate server builds
Hi all
I like to automate the installation of roles and features applied to servers via GPO script.
For my bare metal 2008 R2 installations, a simple .cmd script with something similar to below...
ServerManagerCmd.exe -install NET-Framework-Core Hyper-V Desktop-Experience SNMP-Service -restart
...added to the RunOnce registry key via GPO would deliver Roles and Features reliably.
This method does not work for me in 2012 R2. I've spent a day searching the internet. I cannot find a guide. I assume I need to use Powershell now. I am uncertain if signing scripts is a requirement for this to work for me? Please
could you let me know a method to automate the installation of Roles and Features to 2012 R2 via scripts delivered to bare metal servers via GPO.I think you would do better by posting in the Windows 2012 forum. The issue is more likely that the exact name of the service or package has changed.
There are new tools in 2012 to install features and roles. I do not think they can be run from a GPO.
Here are the instructions:
http://technet.microsoft.com/en-us/library/hh831809.aspx
They show you explicitly how to discover the available Features and Roles on 2012 and how to use PowerSHell to install them.
¯\_(ツ)_/¯ -
Hi,
I would like to know the procedure to call BEx via VB script. Some background about the issue.
I am in the process of performing the stress test for the BI 7.0 using mercury load runner. So, from the mercury i will be calling the VB script to execute the BI query.
Any help will be highly appreciated.
Regards
SachinHi,
Have a look at this Doc:
www.bwexpertonline.com/downloads/boeke04.doc
Hope this will be helpful.
Regards,
Prema -
Starting applications from a keynote via Apple Script?
Is there any way to start an application from a keynote via Apple Script?
Welcome to the forums!
Keynote does not support the use of AppleScript in that fashion. -
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 -
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 AMDear 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 -
Moving a Layer based on percentages via action scripting.
Hi,
I am trying to create an action script that will move a layer 90% to the left or right. Can this be done thru actions or is it something that can only be done via JS Scripting. The reason I need percentages is not all images are the same dimensions.
TIAYou should be able to do it with either.
With an action set you ruler to percent, select all on the layer you want to move and with the move tool move the image. The amount of the move will be recorded in percent.
With a script use activeDocument.activeLayer.translate( new UnitValue(.9,'%'),undefined) to move to the right or activeDocument.activeLayer.translate( new UnitValue(-.9,'%'),undefined)to move to the left -
Launchd won't send email via shell script
I'm trying to send an email via shell script. e.g. my shell script is something like this:
#!/bin/sh
echo testing | mail -s 'this is a test' [email protected]
My launchdaemon runs the script: /usr/local/scripts/testscript.sh
I know the script is working, because I added some debugging (I added a line: echo is this working and sure enough, "is this working" is showing up in the console) but the email part kicks off an error message about 30 seconds later: Stray process with PGID equal to this dead job: PID ### PPID 1 sendmail
The script works when I run it with a cron job. But why wouldn't it work as a launchd item? And why is it I'm only having problems with the email segment of my scripts? I've tried other scripts and they all seem to work fine.There are no errors reported. I'm looking in /var/log/mail.log.
-
Clicking a htmlb:button via Java Script
Hi all!
I would like to 'click' a htmlb:button via Java Script.
Example with a html-button:
<htmlb:button id="b1" onClientClick="javascript:document.form_id['b2'].click()" text="Call Button 2"/>
<input id="b2" type="button" onclick="alert('2')">
Does anybody have an idea how it works with a htmlb:button?
Thanks!
Stefan
Message was edited by: Stefan KittsteinerHi Stefan,
Use this
<script>
function submit()
return htmlbSL(this,2,'b2:b2Click');
</script>
<htmlb:button id="b1" onClientClick="javascript:submit()" text="Call Button 2" />
<htmlb:button id="b2" onClientClick="alert('I am clicked')" text="Button 2" />
b2Click is server event for button 'b2'.
You can also use <bsp:htmlbEvent> for more details see weblog <a href="/people/brian.mckellar/blog/2004/07/18/bsp-in-depth-using-the-htmlb-event-system In-Depth: Using the HTMLB Event System</a>
Regards,
Narinder Hartala -
Set top and bottom inset spacing values in Text Frame Options via jsx script
I am looking for a way to set the top and bottom inset spacing values only to 2 points in Text Frame Options via a .jsx scrpt.
For years, I have used a script that sets Preferences, such as:
with(app.storyPreferences){
opticalMarginAlignment = false;
opticalMarginSize = 12; // pts
I would like to add the code to this same script that would make Top = 0p2 and Bottom 0p2 but leave Left and Right as 0p0.
Any help would be greatly appreciated.Here is the full .jsx file that we now use to set preferences.
Ideally, this could be modified to include setting any text frame created to have 0p2 inset Top and Bottom, but 0p0 Left and Right:
//ApplicationTextDefaults
//An InDesign CS2 JavaScript
//Sets the application text defaults, which will become the text defaults for all
//new documents. Existing documents will remain unchanged.
with(app.textDefaults){
alignToBaseline = false; // align to baseline grid
try {
// appliedFont = app.fonts.item("Times New Roman");
appliedFont = app.fonts.item("Helvetica");
catch (e) {}
try {
fontStyle = "Medium";
catch (e) {}
autoleading = 100;
balanceRaggedLines = false;
baselineShift = 0;
capitalization = Capitalization.normal;
composer = "Adobe Paragraph Composer";
desiredGlyphScaling = 100;
desiredLetterSpacing = 0;
desiredWordSpacing = 100;
dropCapCharacters = 0;
if (dropCapCharacters != 0) {
dropCapLines = 3;
//Assumes that the application has a default character style named "myDropCap"
//dropCapStyle = app.characterStyles.item("myDropCap");
fillColor = app.colors.item("Black");
fillTint = 100;
firstLineIndent = "0pt";
// firstLineIndent = "14pt";
gridAlignFirstLineOnly = false;
horizontalScale = 100;
hyphenateAfterFirst = 3;
hyphenateBeforeLast = 4;
hyphenateCapitalizedWords = false;
hyphenateLadderLimit = 1;
hyphenateWordsLongerThan = 5;
hyphenation = true;
hyphenationZone = "3p";
hyphenWeight = 9;
justification = Justification.leftAlign;
keepAllLinesTogether = false;
keepLinesTogether = true;
keepFirstLines = 2;
keepLastLines = 2;
keepWithNext = 0;
kerningMethod = "Optical";
kerningValue = 0;
leading = 6.3;
// leading = 14;
leftIndent = 0;
ligatures = true;
maximumGlyphScaling = 100;
maximumLetterSpacing = 0;
maximumWordSpacing = 160;
minimumGlyphScaling = 100;
minimumLetterSpacing = 0;
minimumWordSpacing = 80;
noBreak = false;
otfContextualAlternate = true;
otfDiscretionaryLigature = true;
otfFigureStyle = OTFFigureStyle.proportionalOldstyle;
otfFraction = true;
otfHistorical = true;
otfOrdinal = false;
otfSlashedZero = true;
otfSwash = false;
otfTitling = false;
overprintFill = false;
overprintStroke = false;
pointSize = 6.3;
// pointSize = 11;
position = Position.normal;
rightIndent = 0;
ruleAbove = false;
if(ruleAbove == true){
ruleAboveColor = app.colors.item("Black");
ruleAboveGapColor = app.swatches.item("None");
ruleAboveGapOverprint = false;
ruleAboveGapTint = 100;
ruleAboveLeftIndent = 0;
ruleAboveLineWeight = .25;
ruleAboveOffset = 14;
ruleAboveOverprint = false;
ruleAboveRightIndent = 0;
ruleAboveTint = 100;
ruleAboveType = app.strokeStyles.item("Solid");
ruleAboveWidth = RuleWidth.columnWidth;
ruleBelow = false;
if(ruleBelow == true){
ruleBelowColor = app.colors.item("Black");
ruleBelowGapColor = app.swatches.item("None");
ruleBelowGapOverprint = false;
ruleBelowGapTint = 100;
ruleBelowLeftIndent = 0;
ruleBelowLineWeight = .25;
ruleBelowOffset = 0;
ruleBelowOverprint = false;
ruleBelowRightIndent = 0;
ruleBelowTint = 100;
ruleBelowType = app.strokeStyles.item("Solid");
ruleBelowWidth = RuleWidth.columnWidth;
singleWordJustification = SingleWordJustification.leftAlign;
skew = 0;
spaceAfter = 0;
spaceBefore = 0;
startParagraph = StartParagraph.anywhere;
strikeThru = false;
if(strikeThru == true){
strikeThroughColor = app.colors.item("Black");
strikeThroughGapColor = app.swatches.item("None");
strikeThroughGapOverprint = false;
strikeThroughGapTint = 100;
strikeThroughOffset = 3;
strikeThroughOverprint = false;
strikeThroughTint = 100;
strikeThroughType = app.strokeStyles.item("Solid");
strikeThroughWeight = .25;
strokeColor = app.swatches.item("None");
strokeTint = 100;
strokeWeight = 0;
tracking = 0;
underline = false;
if(underline == true){
underlineColor = app.colors.item("Black");
underlineGapColor = app.swatches.item("None");
underlineGapOverprint = false;
underlineGapTint = 100;
underlineOffset = 3;
underlineOverprint = false;
underlineTint = 100;
underlineType = app.strokeStyles.item("Solid");
underlineWeight = .25
verticalScale = 100;
//Units & Increments preference panel
//Must do this to make sure our units that we set are in points. The vert and horiz
//units that get set default to the current measurement unit. We set it to points
//so we can be sure of the value. We'll reset it later to the desired setting.
with(app.viewPreferences){
horizontalMeasurementUnits = MeasurementUnits.points; // Ruler Units, horizontal
verticalMeasurementUnits = MeasurementUnits.points; // Ruler Units, vertical
//General preference panel
with(app.generalPreferences){
pageNumbering = PageNumberingOptions.section; // Page Numbering, View
toolTips = ToolTipOptions.normal; // Tool Tips
// Not supported in CS4
// toolsPalette = ToolsPaletteOptions.doubleColumn; // Floating Tool Palette
completeFontDownloadGlyphLimit = 2000; // Always Subset Fonts...
try {
//Wrapped in try/catch in case it is run with CS4 and earlier to avoid the error
preventSelectingLockedItems = false; // Needed for CS5+
catch (e) {}
//Type preference panel
with (app.textEditingPreferences){
tripleClickSelectsLine = true; // Triple Click to Select a Line
smartCutAndPaste = true; // Adjust Spacing Automatically when Cutting and Pasting Words
dragAndDropTextInLayout = false; // Enable in Layout View
allowDragAndDropTextInStory = true; // Enable in Story Editor
with(app.textPreferences){
typographersQuotes = true; // Use Typographer's Quotes
useOpticalSize = true; // Automatically Use Correct Optical Size
scalingAdjustsText = true; // Adjust Text Attributes when Scaling
useParagraphLeading = false; // Apply Leading to Entire Paragraphs
linkTextFilesWhenImporting = false; // Create Links when Placing Text and Spreadsheet Files
// Missing following (Font Preview Size, Past All Information/Text Only)
//Advanced Type preference panel
with(app.textPreferences){
superscriptSize = 58.3; // Superscript, size
superscriptPosition = 33.3; // Superscript, position
subscriptSize = 58.3; // Subscript, size
subscriptPosition = 33.3; // Subscript, position
smallCap = 70; // Smallcap
with(app.imePreferences){
inlineInput = false; // Use Inline Input for Non-Latin Text
//Composition preference panel
with(app.textPreferences){
highlightKeeps = false; // Keep Violations
highlightHjViolations = false; // H&J Violations
highlightCustomSpacing = false; // Custom Tracking/Kerning
highlightSubstitutedFonts = true; // Substituted Fonts
highlightSubstitutedGlyphs = false; // Substituted Glyphs
justifyTextWraps = false; // Justify Text Next to an Object
abutTextToTextWrap = true; // Skip by Leading
zOrderTextWrap = false; // Text Wrap Only Affects Text Beneath
//Units & Increments preference panel
with(app.viewPreferences){
rulerOrigin = RulerOrigin.spreadOrigin; // Ruler Units, origin
// These are set at the end of the script after all the changes have been made
// horizontalMeasurementUnits = MeasurementUnits.points; // Ruler Units, horizontal
// verticalMeasurementUnits = MeasurementUnits.inches; // Ruler Units, vertical
pointsPerInch = 72; // Point/Pica Size, Points/Inch
cursorKeyIncrement = 1; // Keyboard Increment, Cursor Key
with(app.textPreferences){
baselineShiftKeyIncrement = 2; // Keyboard Increment, Baseline Shift
leadingKeyIncrement = 2; // Keyboard Increment, Size/Leading
kerningKeyIncrement = 20; // Keyboard Increment, Kerning
//Grids preference panel
with(app.gridPreferences){
baselineColor = UIColors.lightBlue; // Baseline Grid, Color
baselineStart = 48; // Baseline Grid, Start
baselineDivision = 6; // Baseline Grid, Increment Every
baselineViewThreshold = 50; // Baseline Grid, View Threshold
baselineGridRelativeOption = BaselineGridRelativeOption.topOfPageOfBaselineGridRelativeOption; // Baseline Grid, Relative To
gridColor = UIColors.lightGray; // Document Grid, Color
horizontalGridlineDivision = 12; // Document Grid, Horizontal, Gridline Every
horizontalGridSubdivision = 12; // Document Grid, Horizontal, Subdivisions
verticalGridlineDivision = 12; // Document Gird, Vertical, Gridline Every
verticalGridSubdivision = 12; // Document Grid, Vertical, Subdivisions
gridsInBack = true; // Grids in Back
documentGridSnapto = false; // snap to grid or not
documentGridShown = false; // show document grid
//Guides & Pasteboard preference panel
with(app.documentPreferences){
marginGuideColor = UIColors.violet; // Color, Margins
columnGuideColor = UIColors.magenta; // Color, Columns
with(app.pasteboardPreferences){
bleedGuideColor = UIColors.fiesta; // Color, Bleed
slugGuideColor = UIColors.gridBlue; // Color, Slug
previewBackgroundColor = UIColors.lightGray; // Color, Preview Background
minimumSpaceAboveAndBelow = 72; // Minimum Vertical Offset
with(app.viewPreferences){
guideSnaptoZone = 4; // Snap to Zone
with(app.guidePreferences){
guidesInBack = false; // Guides in Back
//Dictionary preference panel
with(app.dictionaryPreferences){
composition = ComposeUsing.both; // Hyphenatin Exceptions, Compose Using
mergeUserDictionary = false; // Merge User Dictionary into Document
recomposeWhenChanged = true; // Recompose All Stories When Modified
// Missing (Lang, Hyph, Spelling, Double Quotes, Single Quotes)
//Spelling preference panel
with(app.spellPreferences){
checkMisspelledWords = true; // Find, Misspelled Words
checkRepeatedWords = true; // Find, Repeated Words
checkCapitalizedWords = true; // Find, Uncapitalized Words
checkCapitalizedSentences = true; // Find, Uncapitalized Sentences
dynamicSpellCheck = true; // Enable Dynamic Spelling
misspelledWordColor = UIColors.red; // Color, Misspelled Words
repeatedWordColor = UIColors.green; // Color, Repeated Words
uncapitalizedWordColor = UIColors.green; // Color, Uncapitalized Words
uncapitalizedSentenceColor = UIColors.green; // Color, Uncapitalized Sentences
//Autocorrect preference panel
with(app.autoCorrectPreferences){
autoCorrect = true; // Enable Autocorrect
autoCorrectCapitalizationErrors = false; // Autocorrect Capitalization
// Missing (Language, Misspelled word pairs)
//Display Performance preference panel
with(app.displayPerformancePreferences){
defaultDisplaySettings = ViewDisplaySettings.typical; // Preserve Object-Level
persistLocalSettings = false;
// Missing (antialiasiing, greek below
//Story Editor Display preference panel
with(app.galleyPreferences){
textColor = InCopyUIColors.black; // Text Color
backgroundColor = InCopyUIColors.white; // Background
smoothText = true; // Enable Anti-Aliasing
antiAliasType = AntiAliasType.grayAntialiasing; // Type
cursorType = CursorTypes.standardCursor; // Cursor Type
blinkCursor = true; // Blink
// Missing (Font, Size, Line Spacing & Theme)
//File Handling preference panel
with(app.generalPreferences){
includePreview = true; // Always Save Preview Images with Doc
previewSize = PreviewSizeOptions.medium; // Preview Size
with(app.clipboardPreferences){
preferPDFWhenPasting = false; // Prefer PDF When Pasting
copyPDFToClipboard = true; // Copy PDF to Clipboard
preservePdfClipboardAtQuit = false; // Preserve PDF Data at Quit
// Missing (Enable Version Cue)
// Optical margin (hanging punctuation, outside margins)
with(app.storyPreferences){
opticalMarginAlignment = false;
opticalMarginSize = 12; // pts
//Wrap Up (do at end of script)
//Units & Increments preference panel
//Must do this to make sure our units that we set are in points. The vert and horiz
//units that get set default to the current measurement unit. We set it to points
//so we can be sure of the value. We'll reset it later to the desired setting.
with(app.viewPreferences){
horizontalMeasurementUnits = MeasurementUnits.picas; // Ruler Units, horizontal
verticalMeasurementUnits = MeasurementUnits.inches; // Ruler Units, vertical
// These two flags are turned off to avoid the error message about
// missing image links when InDesign opens an ad. This can especially
// be a problem when doing batch processes.
with(app.linkingPreferences){
checkLinksAtOpen = false; // checkbox: true/false
findMissingLinksAtOpen = false; // checkbox: true/false
Maybe you are looking for
-
Problem cloning hard disk for 10.6 setup
Hi all, I just got Snow Leopard for my office MacBook Pro and for my home MacBook. On both machines I got an error message when trying to install it that my partition scheme is not GUID, so 10.6 won't install. First I worked on the MBP. It has a 250
-
Hi every one Can any one help me out to read the ClobDomain data? My requirement is I have the ClobDomain with me, I need to iterate each line of ClobDomain Data and I need to store each row values in a database. Thanks
-
Hi We are using 11.5.10.2 1) How to rollback the Appraisals with the status "Deleted" ( I believe they deleted from RFC notification, I have hidden all the delete option by personalization). 2) Is there anyway, the employee can enter the appraisal co
-
When I try to update my sons iPod it says " The iPod cannot be updated because the firmware file could not be found". Is there any way to download and reinstall this file? I tried to do a restore and get the same message. It's an iPod video 30GB Than
-
Can't update from 4.2.1 to 4.2.6
For some reason I'm unable to update from iOS 4.2.1 to 4.2.6. When I hit the Check for Update button in iTunes, I get the message "This version of iPhone software (4.2.1) is the current version." (iPhone 4 (not jailbroken); iTunes 10.1.2; OS X 10.6.6