Jump to content

Arnautov

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Arnautov

  1. Try to extend u'r code like that and inspect the error that is returned. If DriveMapAdd() function is fail, then Exit code is 1, and a MsgBox with @extended error code will be displayed. Depending on the number of this @extended error u can make more decisions, like using "net helpmsg <errorcode>" ; ;### map network drives ; Exit _MapDriveDiffUser("TheLetterYouChoose","YourServerNameHere","YourShareHere", "YourUserNameHere", "YourPasswordHere") Func _MapDriveDiffUser ($driveletter, $servername, $servershare, $serverusrname, $serverusrpasswd) $result = 0 If DriveMapGet($driveletter & ":") <> "\\" & $servername & "\" & $servershare Then DriveMapDel($driveletter & ":") Sleep(250) EndIf If Not DriveMapAdd($driveletter & ":", "\\" & $servername & "\" & $servershare, 0, $serverusrname, $serverusrpasswd) Then $result = @error MsgBox (0, "Extended error", "Error " & $result & " with extended code " & @extended) EndIf Return $result EndFunc;==>_MapDriveDiffUser p.s. Your code looks fine, think the problem not in it is. upd. forgot to delete passwords etc.
  2. Brett, according to your expirience - if i would want to control application like IE with making clics on it control. what should i use - ControlClick() or MouseClick()? Actually, i had some time to try it with ControlClick on IE7, but with no success. Going to try it with MouseClick, but maybe u did it already and have something 2 say?
  3. even if it works - it kills all the fun!
  4. hehe, i get at the humor that's the legacy of my installation mistake. IE's path is correct in my case. And my hands need to be replanted to the right position.
  5. loop can be never exited. And in my case the tip "Win Activated done" can't be reached! The tooltip "Win Active done" is the last one i see. Going to dig it later.
  6. OMG! IT'S ALIVE! works beatiful before sending enter. Sending enter doesn't work for me. I think the cause is missed focus. just inserted controlclick ("Internet Explorer", "", "[CLASS:Edit;INSTANCE:1]") before sending enter and script works fine. I wonder if we have so differ reacting of IE. anyway, thnx for demonstration Had fun and made a note
  7. well, my idea was to check availability of doing it. This can be used in other tasks, so all i done was just a simple reseach. also it shows some restrictions and flavours of autoit. the best way to study something is to use it? Exept destructive techs, ye...
  8. ok, ignoring the "easiest ever made" solution by BrettF i found how 2 fill the address string in IE: autoitsetoption("WinTitleMatchMode",2) run ("d:\Program Files\Internet Explorer\iexplore.exe") winwaitactive ("Internet Explorer") sleep(700) controlclick ("Internet Explorer", "", "[CLASS:Edit;INSTANCE:1]") send ( "{BS}" ) send ( "www.cnn.com" ) send ( "{ENTER}" ) and must say it won't work without sleep! 700 - empiric value, 675 doesn't work Think it differ according to the computers productivity/
  9. yes, BrettF, u'r solution works fine. Thnx. Question is changed, as i understand it 2Jetta yes that's a normal problem of a modern software User act's faster than a software reacts U can recreate the problem without using autoit, just start iexplore and type F6 when u c IE window. Depending on the power of u'r computer u can miss the selecting of address string sleep(n) command can help and, yes, the controlsend string can b omitted, i think. actually, it would be more adequate to select edit1 field without using send("{f6}") command. RTFM whispered something like ControlFocus ( "title", "text", controlID ), i tried it without any positive results.
  10. autoitsetoption("WinTitleMatchMode",2) run ("d:\Program Files\Internet Explorer\iexplore.exe") winwaitactive("Internet Explorer") ControlSend("Internet Explorer", "", "Edit1", "www.cnn.com") Send ( "{F6}") Send ( "{BS}" ) Send ( "www.cnn.com" ) Send ( "{ENTER}" ) i don't like this code. It worked. But i hate it. Shure other ways exists.
  11. from .chm help-file <quote> Window Titles and Text (Advanced) ... Mode 1 (default) Matches partial titles from the start ... Mode 2 Matches any substring in the title. </quote> when i start ie using run(...) command - it has "about:blank - Microsoft Internet Explorer" window info (idea is it starting title from the name of the opened page) I think u need the second mode of searching window title. It can be set using AutoItSetOption ( "option" [, param] ) sorry if wrong, newbie upd. and u need to clear the edit1 string have any ideas how 2 do it? autoitsetoption("WinTitleMatchMode",2)
  12. hi. Couldn't find any information about the try-catch structures using search engine on this forum, and coutldn't find any clues in .chm help file of autoitV3. Is there any similar structures or metods for try-catch functionalities when working with COM-objects? thnx.
×
×
  • Create New...