Author Topic: Close text screen  (Read 8788 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #15 on: August 17, 2011, 09:01:53 AM »
Man, it is way to early to be coding, or doing anything for that matter.
Well in that case...  ;)
Oh yeah, well... :lol:

Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Close text screen
« Reply #16 on: August 17, 2011, 09:07:29 AM »
Man, it is way to early to be coding, or doing anything for that matter.
Well in that case...  ;)
Oh yeah, well... :lol:


   :lmao:

Every time I see Penn & Teller, in my head I hear Teller yelling "ARE WE LIVE?!!!?"   :-)
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #17 on: August 17, 2011, 09:09:34 AM »
Man, it is way to early to be coding, or doing anything for that matter.
Well in that case...  ;)
Oh yeah, well... :lol:


   :lmao:

Every time I see Penn & Teller, in my head I hear Teller yelling "ARE WE LIVE?!!!?"   :-)
I always hear him trying to get H.S. Thompson to pay to have his face on a giant cowboy.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Close text screen
« Reply #18 on: August 17, 2011, 11:01:23 AM »
But original (graphscr) already works fine...

I thought, you would supply (textscrchk) that will return T if textscreen is active and nil if not...
Sorry, for this remark, but I don't really see where I can use (_graphscr) and that it has more sense then just closing textscreen...

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #19 on: August 17, 2011, 11:03:51 AM »
But original (graphscr) already works fine...

I thought, you would supply (textscrchk) that will return T if textscreen is active and nil if not...
Sorry, for this remark, but I don't really see where I can use (_graphscr) and that it has more sense then just closing textscreen...

M.R.
Have more than one monitor, move the textscreen to the opposite monitor with the drawing window active, then activate (graphscr) and see what happens.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Close text screen
« Reply #20 on: August 17, 2011, 11:10:07 AM »
Sorry, I use just one monitor (don't have dual monitor system)... But I was wondering if you could code (textscrchk)?
Thanks Alan...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Close text screen
« Reply #21 on: August 17, 2011, 11:17:05 AM »
Sorry, I use just one monitor (don't have dual monitor system)... But I was wondering if you could code (textscrchk)?
Thanks Alan...

?? o_0

What is textscrchk supposed to be/do?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Close text screen
« Reply #22 on: August 17, 2011, 11:42:41 AM »
When you use (vl-cmdf "textscr") it will activate textscreen and return T always... If you use (command "textscr") it will activate textscreen and return nil always... Simply, there are no sys variables that will show weather textscreen is active or not, there is only "SCREENMODE" variable that is on my system read-only and set to "3" representing that both text and display screen is displayed and configured :
Quote
SCREENMODE - sysvar
Indicates the state of the display.

The setting is stored as a bitcode using the sum of the following values:

0   Text screen is displayed
1   Drawing area is displayed
2   Dual-screen display is configured

I need something that will when text screen is displayed return value ex. T and if drawing area is displayed return value ex. nil... Function that I named (textscrchk)...

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Close text screen
« Reply #23 on: August 17, 2011, 12:46:07 PM »
When you use (vl-cmdf "textscr") it will activate textscreen and return T always... If you use (command "textscr") it will activate textscreen and return nil always... Simply, there are no sys variables that will show weather textscreen is active or not, there is only "SCREENMODE" variable that is on my system read-only and set to "3" representing that both text and display screen is displayed and configured :
Quote
SCREENMODE - sysvar
Indicates the state of the display.

The setting is stored as a bitcode using the sum of the following values:

0   Text screen is displayed
1   Drawing area is displayed
2   Dual-screen display is configured

I need something that will when text screen is displayed return value ex. T and if drawing area is displayed return value ex. nil... Function that I named (textscrchk)...

M.R.

Not the best approach, but all I could think of:

Code: [Select]
(defun textscrchk ( / wsh res )
    (setq wsh (vlax-create-object "WScript.Shell"))
    (setq res
        (vlax-invoke wsh 'appactivate
            (strcat "AutoCAD Text Window - "
                (if (eq (getenv "ShowFullPathInTitle") "1")
                    (getvar 'DWGPREFIX)
                    ""
                )
                (getvar 'DWGNAME)
            )
        )
    )
    (vlax-release-object wsh)
    (= -1 res)
)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #24 on: August 17, 2011, 01:03:25 PM »
I thought about that, but it just makes it the active window if it's been opened but not active.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Close text screen
« Reply #25 on: August 17, 2011, 01:04:34 PM »
I thought about that, but it just makes it the active window if it's been opened but not active.

I thought that was the request? To see if it was open or not?

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #26 on: August 17, 2011, 01:06:46 PM »
I thought about that, but it just makes it the active window if it's been opened but not active.

I thought that was the request? To see if it was open or not?
Right, but that will also make it active, even if it's not.

Open the text screen, click on your drawing window to activate it, putting the text screen behind the autocad drafting screen (text screen now open, but not active) and then active your check.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Close text screen
« Reply #27 on: August 17, 2011, 01:58:01 PM »
I thought that was the request? To see if it was open or not?

I didn't really wanted to make someone so seriously approach to my request... I don't see its possible purpose, but for me even info is enough for now... Maybe someone can make this code has more useful meaning... Greatly appreciated your interest and thanks to both of you...

Marko R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Close text screen
« Reply #28 on: August 17, 2011, 01:59:57 PM »
I thought that was the request? To see if it was open or not?

I didn't really wanted to make someone so seriously approach to my request... I don't see its possible purpose, but for me even info is enough for now... Maybe someone can make this code has more useful meaning... Greatly appreciated your interest and thanks to both of you...

Marko R.
It's just fun to hack away at the computer.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Close text screen
« Reply #29 on: August 17, 2011, 02:01:38 PM »
I thought that was the request? To see if it was open or not?

I didn't really wanted to make someone so seriously approach to my request... I don't see its possible purpose, but for me even info is enough for now... Maybe someone can make this code has more useful meaning... Greatly appreciated your interest and thanks to both of you...

Marko R.
It's just fun to hack away at the computer.

1+  8-)