Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Creating a process and/or executing a ruby script internally
Steven Garcia
1/16/2008 2:28:00 PM
##this is my process create script
puts('hello im run create clicker')
$pid = Process.create(
:app_name => 'ruby clicker.rb',
:creation_flags => Process::DETACHED_PROCESS
).process_id
at_exit{ Process.kill(9,$pid) }
##this is script that is supposed to be the called process
begin
autoit = WIN32OLE.new('AutoItX3.Control')
loop do
autoit.ControlClick("Microsoft Internet Explorer",'', 'OK')
autoit.ControlClick("Windows Internet Explorer",'', 'OK')
autoit.ControlClick("Security Information",'', '&Yes')
autoit.ControlClick("Security Alert",'', '&Yes')
sleep(2)
end
rescue Exception => e
puts e
end
--------------------------------------------------------
In my trek in using WATIR, and building a tough framework for multi-user
tests, I ran across the a couple of javascript alerts. Some researching
has landed me upon this script, that basically creates a daemon of
clicker.rb.
In any case, the problem I'm having has to do with the creating of the
process. A random process is being created in place of where
'clicker.rb' should be.
I've checked the file name of the 'clicker.rb' script, and its as it
should be; and when I run 'clicker.rb' it does its job just as it
should.
The two files are in the same directory as well, I've pretty much got
myself stumped as to why 'clicker.rb' is not being called. Does the
error have to do with the syntax of my name? I tried inputting in the
full file directory path, but maybe I did it wrong.
My requirements are also correct for both files.
Eh...any help would be greatly appreciated
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Creating a process and/or executing a ruby script internally
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password