Palestinian Posted March 9, 2014 Share Posted March 9, 2014 (edited) Hello everyone, The script I made runs perfectly on windows 8 without any problems, but testing it on windows 7, at a certain line the script doesn't do the job its supposed to be doing, Windows 8 is admin, Windows 7 is limited, I doubt thats the reason causing the problem because I made sure that my script doesn't require any admin rights what so ever, here is the part that doesn't work: While 1 $oIE = _IEAttach("Health Assistance") $iPleaseWait = _IEGetObjById($oIE, "ctl00_panelUpdateProgress") $iInner = $iPleaseWait.innerhtml $iLoading= StringInStr($inner, '"true"') Switch $iLoading Case "0" Sleep(100) Case Else ExitLoop EndSwitch WEnd It's suppose to get the inner html of a certain part of the page source, save it then search through it for the word true then act according, as you can see admin rights got nothing to do with it (or at least I think it doesn't?), I can't test on an admin win7 user simply because I don't have windows 7 nor a virtual machine to test on, the windows 7 limited user I'm testing on is a co-workers computer. Any idea what might be causing the script to act like that on a Win7 computer? Edited March 9, 2014 by Palestinian Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2014 Share Posted March 9, 2014 You need to provide more specifics. What version of IE is running on each workstation? Which line "doesn't do the job its supposed to be doing"? Run the script in Scite and post the Output window results. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Palestinian Posted March 9, 2014 Author Share Posted March 9, 2014 You need to provide more specifics. What version of IE is running on each workstation? Which line "doesn't do the job its supposed to be doing"? Run the script in Scite and post the Output window results. On my Windows 8 there is IE v10, on the Windows 7 there is IE v8, the line that doesn't do the job is the line I posted, and I can't run the script as a script on the Windows 7 computer because as stated before, it's a co-workers computer with a limited user, I could try running it using a portable AutoIt but I left work 2 hours ago and tomorrow is a day off.... The only thing that could prevent it from working is not being able to execute the "_IEGetObjById" again, the 1st time the line is triggered the program stops as it should, but it doesn't resume after once $iLoading value changes and isn't "0" anymore. Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2014 Share Posted March 9, 2014 Sorry, but I'm still not following you. You haven't stated which line isn't working as expected. As I requested previously, Run the script in Scite and post the Output window results. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Palestinian Posted March 9, 2014 Author Share Posted March 9, 2014 Sorry, but I'm still not following you. You haven't stated which line isn't working as expected. As I requested previously, Run the script in Scite and post the Output window results. While 1 $oIE = _IEAttach("Health Assistance") $iPleaseWait = _IEGetObjById($oIE, "ctl00_panelUpdateProgress") $iInner = $iPleaseWait.innerhtml $iLoading= StringInStr($inner, '"true"') Switch $iLoading Case "0" Sleep(100) Case Else ExitLoop EndSwitch WEnd That's the part that isn't working as expected, and as stated previously twice, the Windows 7 computer is my co-workers computer, at work, I do not have access to it at the moment because as I said, I'm home already. I was more precise in my previous replies when I said what happens in the script, and what doesn't happen on Windows 7, I don't believe I can explain it any better in English. Link to comment Share on other sites More sharing options...
Solution Danp2 Posted March 9, 2014 Solution Share Posted March 9, 2014 Reposting the same code doesn't help. You previously stated: The script I made runs perfectly on windows 8 without any problems, but testing it on windows 7, at a certain line the script doesn't do the job its supposed to be doing but, you have not said which particular line of code isn't functioning as expected. If the call to _IEGetObjById failing? Are you not getting back the desired value from innerhtml? Or what?! Have you tried running IE10 in compatibility mode to see if you can duplicate the issue? P.S. StringInStr returns a numeric value, so your code likely could be written like this: While 1 $oIE = _IEAttach("Health Assistance") $iPleaseWait = _IEGetObjById($oIE, "ctl00_panelUpdateProgress") $iInner = $iPleaseWait.innerhtml $iLoading= StringInStr($inner, '"true"') If $iLoading Then ExitLoop EndIf Sleep(100) WEnd Palestinian 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Palestinian Posted March 9, 2014 Author Share Posted March 9, 2014 Sorry about that, miscommunication, I was referring to the entire script I posted as "line", i got +3600 lines in my script, I call each "part" line. I tried running IE 10 in compatibility mode and indeed the issue was duplicated, using the code you edited made it work perfectly, I guess the Switch was causing the problem. Thank you and sorry again mate. Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2014 Share Posted March 9, 2014 No problem... glad we finally got it figured out! Latest Webdriver UDF Release Webdriver Wiki FAQs 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