1984
(Starting to like KiXtart)
2004-03-05 04:51 PM
Help, getting really confued! :-(

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


Richard H.Administrator
(KiX Supporter)
2004-03-05 05:00 PM
Re: Help, getting really confued! :-(

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.


Radimus
(KiX Supporter)
2004-03-05 05:05 PM
Re: Help, getting really confued! :-(

double up the % and & characters...

Radimus
(KiX Supporter)
2004-03-05 05:08 PM
Re: Help, getting really confued! :-(

BTW... have you tried:
'https://support.dell.com/ProductSelection.aspx?SvcTag='+$serno
'http://productfinder.support.hp.com/tps/ProductFinder?h_query='+join(split($model),'+')


1984
(Starting to like KiXtart)
2004-03-05 05:28 PM
Re: Help, getting really confued! :-(

Richard can u give me an example how to use COM automation and navigate metod?

Richard H.Administrator
(KiX Supporter)
2004-03-05 05:28 PM
Re: Help, getting really confued! :-(

Code:
Function Vensupp($model,$setag) 
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 "True"
$url = ''
EndSelect
If $url
; Create Internet Explorer object
$oIE = CreateObject("InternetExplorer.Application")
$oIE.Visible=1
$oIE.Navigate($url)
; Wait for page to stop loading...
While $oIE.busy AND $oIE.readystate <> 4 AND @ERROR = 0 Loop
EndIf
EndFunction



1984
(Starting to like KiXtart)
2004-03-05 05:47 PM
Re: Help, getting really confued! :-(

Thanx, but its not working :-( gives me "invalid method/function call: missing required parameter 1"

Have to check whats going on....


Radimus
(KiX Supporter)
2004-03-05 05:50 PM
Re: Help, getting really confued! :-(

double up the % and & characters... kix requires that

1984
(Starting to like KiXtart)
2004-03-05 05:54 PM
Re: Help, getting really confued! :-(

This 'https://support.dell.com/ProductSelection.aspx?SvcTag='+$serno is not working...double % and & is not working either...hummm what 2 do

Kdyer
(KiX Supporter)
2004-03-05 05:59 PM
Re: Help, getting really confued! :-(

What about doubling the "??"?

In KiX, the ? is reserved.

So, it should be -

'https://support.dell.com/ProductSelection.aspx??SvcTag='+$serno

Kent


1984
(Starting to like KiXtart)
2004-03-05 05:59 PM
Re: Help, getting really confued! :-(

http://support.euro.dell.com/uk/en/index.asp?referrer=%%2Fuk%%2Fen%%2Fhome%%2Easp&&segment=BSD .... the same... not working :-(


1984
(Starting to like KiXtart)
2004-03-05 06:08 PM
Re: Help, getting really confued! :-(

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




Radimus
(KiX Supporter)
2004-03-05 09:30 PM
Re: Help, getting really confued! :-(

here is the IBM page...

"http://www-306.ibm.com/pc/support/site.wss/quickPath.do?quickPathEntry="+$serno


maciep
(Korg Regular)
2004-03-05 09:41 PM
Re: Help, getting really confued! :-(

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'
shell 'cmd /c start ' + $cmd



Radimus
(KiX Supporter)
2004-03-05 09:55 PM
Re: Help, getting really confued! :-(

you do realize that all those addl parameters are unnecessary...

this works just fine: 'http://support.euro.dell.com/uk/en/index.asp'


1984
(Starting to like KiXtart)
2004-03-06 11:22 AM
Re: Help, getting really confued! :-(

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


Richard H.Administrator
(KiX Supporter)
2004-03-06 02:54 PM
Re: Help, getting really confued! :-(

Quote:

What about doubling the "??"?

In KiX, the ? is reserved.

So, it should be -

'https://support.dell.com/ProductSelection.aspx??SvcTag='+$serno




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.


Richard H.Administrator
(KiX Supporter)
2004-03-06 03:00 PM
Re: Help, getting really confued! :-(

Quote:

Thanx, but its not working :-( gives me "invalid method/function call: missing required parameter 1"




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)