SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Aug 2004
    Location
    London
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Attach to Notepad inconsistency

    I have written a script, and created a notepad object. Before when I ran this test, it worked. Now it says it cannot attach to the window.??

    I have re-opened the object, and clicked Locate, it finds it with no problem, but when running the script it doesnt pick it up. I have even re-recorded it and tried with the default properties.

    Ive checked the object properties, they are all consistent, Caption is set to * as the file opened in Notepad wont always have the same name.

    Does anyone know why this happens, I spoke to someone they said sometime Notepad conflicts with IE, however I dont have IE open so I cant see why theres any conflict.

    Please help or offer a suggestion.

  2. #2
    Senior Member
    Join Date
    Sep 2001
    Location
    Philly
    Posts
    1,231
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Attach to Notepad inconsistency

    It sounds like it should work, are you using the applicaiton name in the attach name?...

    Window("Application=Notepad").Attach
    ~Alias~

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Location
    London
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Attach to Notepad inconsistency

    Hi Alias

    No Im not using that, heres the details...

    -CODE-

    If Window("Notepad Main Window").Exists Then
    Window("Notepad Main Window").Attach
    If EditBox("Notepad Query Result Data").Exists Then
    EditBox("Notepad Query Result Data").Attach

    -OBJECT PROPERTIES-
    Application: NOTEPAD.EXE
    Caption: *
    TypeName: Window

    (significant properties above) only these are checked.

    I just cant understand why, if I even recapture, and click Locate its there, it flashes, but when running the script, it doesnt pick it up. I only seem to get this with notepad????

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    Philly
    Posts
    1,231
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Attach to Notepad inconsistency

    should be working... (?)

    I would try to use raw attaches and see if it makes any dif. By that I mean have the property in the attach statement...

    if Window("Application=Notepad.exe",tpattachnowait).e xists then
    ~Alias~

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Location
    London
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Attach to Notepad inconsistency

    yeah ok, thanx alias, it works but raw attach is a bit of amateur way of doing it, isn't it? well what im saying is that it can do more bad than good cant it?

  6. #6
    Senior Member
    Join Date
    Jun 2002
    Location
    farmington hills, MI, US
    Posts
    713
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Attach to Notepad inconsistency

    If you do not use the tpattachnowait flag and the object does not exist you will get a fail to attach message. Your object is probably fine.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:31 AM.

Copyright BetaSoft Inc.