Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Phone Trick Automation (See related posts)

// Automate data entry and execution of phone trick
#    Written by:  steve at r3lax.com
#
 
require 'win32ole'

ie = WIN32OLE.new('InternetExplorer.Application')
ie.navigate("http://www.phonetrick.com")
ie.visible = true
sleep 1 while ie.readyState() != 4
ie.document.all["PhoneNumberToDial"].value ="1234567890"
ie.document.all["CallerID"].value ="0123456789"
ie.document.all["CallerIDname"].value ="Matz"
ie.document.all["VoiceID"].value ="3"
ie.document.all["TextToSay"].value ="Ruby Rulez!"

call = nil
ie.document.all.tags("input").each do |i|
  if i.value == "Call!"
    call = i
    break
  end
end

  if call
    call.click()
  end 


You need to create an account or log in to post comments to this site.


Related Posts