arlanne2 Posted September 21, 2011 Share Posted September 21, 2011 (edited) to all coders i need help, i need a .vbs code that can insert an inputed key from the first line insert to the second line between the linkmac=Inputbox("Enter MAC here","EXAMPLE","001f1f658279") ie.navigate("http://169.254.1.1/main.cgi?mac_esn=(I WANT TO INSERT THE MAC HERE)a&catindex=3&pageindex=1&Session=1979932169")ex. outcome it looks like thisie.navigate("http://169.254.1.1/main.cgi?mac_esn=001f1f658279a&catindex=3&pageindex=1&Session=1979932169")and this i dont know how to code this input a key without the colon but then the autcome will include the colon.ESN=Inputbox("Enter Canopy ESN","EXAMPLE","d8813a")oShell.SendKeys "d8:81:3a"ex. outcome it looks like this d8:81:3aonce again thanks for any help. TIA Edited September 22, 2011 by arlanne2 Link to comment Share on other sites More sharing options...
gunsmokingman Posted September 21, 2011 Share Posted September 21, 2011 What is the question? Link to comment Share on other sites More sharing options...
arlanne2 Posted September 21, 2011 Author Share Posted September 21, 2011 1. i want to insert a inputed key from the first line to the second line but i dont know how to do it. 2. input a key without the cologne then the final outcome with separate colonge ex. aabbcc aa:bb:cc Link to comment Share on other sites More sharing options...
gunsmokingman Posted September 21, 2011 Share Posted September 21, 2011 mac=Inputbox("Enter MAC here","EXAMPLE","001f1f658279") ie.navigate("http://169.254.1.1/main.cgi?mac_esn=(I WANT TO INSERT THE MAC HERE)a&catindex=3&pageindex=1&Session=1979932169")mac=Inputbox("Enter MAC here","EXAMPLE","001f1f658279") ie.navigate("http://169.254.1.1/main.cgi?mac_esn=(mac)a&catindex=3&pageindex=1&Session=1979932169")If You Need To Have Quotes Around "mac"Chr(34) = "mac=Inputbox("Enter MAC here","EXAMPLE","001f1f658279") ie.navigate("http://169.254.1.1/main.cgi?mac_esn=(Chr(34) & mac & Che(34))a&catindex=3&pageindex=1&Session=1979932169") Link to comment Share on other sites More sharing options...
IcemanND Posted September 22, 2011 Share Posted September 22, 2011 Store the HTTP string in a variable:HTTPString = "http://169.254.1.1/main.cgi?mac_esn=XXXXXXXXXXXXa&catindex=3&pageindex=1&Session=1979932169"Now your REPLACE to put your MAC address in the place of XXXXXXXXXXXXFinalHTTP = Replace (HTTPString, "XXXXXXXXXXXX", YourMAC)Then call ie.Navigate with the new stringie.navigate(FinalHTTP) Link to comment Share on other sites More sharing options...
arlanne2 Posted September 23, 2011 Author Share Posted September 23, 2011 thank you boss... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now