|
|
|||||||
Hey, can anyboy tell me why the "dell" part of the script is not working? The "comapq" and "hp" part works well, but i cannot get "dell" part to work, it just stops at the url, while it should use the $setag value and go on to next page. $vendor = PC vendor $setag = PC Serial no Function Vensupp Select Case InStr($vendor,'dell') $url = 'http://support.euro.dell.com/uk/en/index.asp?referrer=%2Fuk%2Fen%2Fhome%2Easp&segment=BSD'+Join($setag,"+") Case InStr($vendor,'compaq') $url = 'http://productfinder.support.hp.com/tps/ProductFinder?h_query='+Join(Split($model),'+') Case InStr($vendor,'Hewlett-Packard') $url = 'http://productfinder.support.hp.com/tps/ProductFinder?h_query='+Join(Split($model),'+') Case 1 $url = '' EndSelect If $url Run 'cmd /c start '+$url EndIf EndFunction C the |
||||||||
|
|
|||||||
The "%" characters may be expanded to environment variables, and the "&" may also cause confusion. A much simpler and cleaner solution is to start IE via COM automation, and use the "navigate" method to open the page. This will avoid all the possible issues with meta-characters. |
||||||||
|
|
|||||||
double up the % and & characters... |
||||||||
|
|
|||||||
BTW... have you tried: 'https://support.dell.com/ProductSelection.aspx?SvcTag='+$serno 'http://productfinder.support.hp.com/tps/ProductFinder?h_query='+join(split($model),'+') |
||||||||
|
|
|||||||
Richard can u give me an example how to use COM automation and navigate metod? |
||||||||
|
|
|||||||
Code: Function Vensupp($model,$setag) |
||||||||
|
|
|||||||
Thanx, but its not working :-( gives me "invalid method/function call: missing required parameter 1" Have to check whats going on.... |
||||||||
|
|
|||||||
double up the % and & characters... kix requires that |
||||||||
|
|
|||||||
This 'https://support.dell.com/ProductSelection.aspx?SvcTag='+$serno is not working...double % and & is not working either...hummm what 2 do |
||||||||
|
|
|||||||
What about doubling the "??"? In KiX, the ? is reserved. So, it should be - 'https://support.dell.com/ProductSelection.aspx??SvcTag='+$serno Kent |
||||||||
|
|
|||||||
http://support.euro.dell.com/uk/en/index.asp?referrer=%%2Fuk%%2Fen%%2Fhome%%2Easp&&segment=BSD .... the same... not working :-( |
||||||||
|
|
|||||||
Now somthing happens, I doubled the ? and its move on to secound page, but its not using the $setag value as it should... http://support.euro.dell.com/uk/en/index.asp??referrer=%%2Fuk%%2Fen%%2Fhome%%2Easp&&segment=BSD stil |
||||||||
|
|
|||||||
here is the IBM page... "http://www-306.ibm.com/pc/support/site.wss/quickPath.do?quickPathEntry="+$serno |
||||||||
|
|
|||||||
this seems to work fine for me: Code: $cmd = 'http://support.euro.dell.com/uk/en/index.asp?referrer=%%2Fuk%%2Fen%%2Fhome%%2Easp&segment=BSD' |
||||||||
|
|
|||||||
you do realize that all those addl parameters are unnecessary... this works just fine: 'http://support.euro.dell.com/uk/en/index.asp' |
||||||||
|
|
|||||||
Go to http://support.euro.dell.com/uk/en/home.asp On "my dell" section click on the link "Set a tag for use on my support site". U will get into another page : http://support.euro.dell.com/uk/en/index.asp?referrer=%2Fuk%2Fen%2Fhome%2Easp&segment=LCA . In this page the value of $setag should be placed in the "Please enter your System Service Tag" box and then "GO". Then it should enter: http://support.euro.dell.com/uk/en/home.asp This time u will see at "my dell" section info about your dell pc. Thats what Im try to do. Forget all other pages etc. None of the above metod works...mayby I use Sendkey... no good idea...:-( Stil |
||||||||
|
|
|||||||
Quote: Not quite right. Things like '@' and '$' and '%' are metacharacters which can be expanded inside strings and so need special attention. "?" is simply a keyword in the same way as "Break" or "Cls". When it is in a string it has no special meaning - at least not to KiXtart. |
||||||||
|
|
|||||||
Quote: Apologies, I tidied up the function definition and I assumed that you would spot it. Functions should be "black boxes". There are only two good reasons for using global variables in a function, and you are unlikely to come across them soon. Therefore, to call the function, pass the parameters: Code: $sResult=Vensupp($model,$setag) |