Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Oct 2006
    Posts
    345

    Remove window title from app, how to ?

    strange request, why is not important, just if it is possible before i chase my tail around !!

    i would like to open a text file in notepad (or the users default text file handler) .... but i need the window title text to be blank or edit out a specific word in the title.

    for example, i open a text file in AMS using File.Run, no problem this opens the text file in note pad, and places the files full path in the window title, in that title lets say it has "Qwerty" as a folder, i'd like to replace that with "hidden" ... or simply remove the title text completely.

    is this possible, or would it be easier for me to find a different approach to displaying the text ? .. i cant use Dialog.SplashMessage becasue of the volume of text involved, it must be able to scroll down


    TIA

  2. #2
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    have you considered using the 'debug' window - actions instead
    has auto horiz and vert scroll bars.

    I can provide some code here that can obtain the window handle to
    the debug window so you can manipulate it like any other window via
    ams window actions.. eg you can set-change the debug 'window title', size etc

    http://www.indigorose.com/forums/sho...t=debug+window
    Last edited by Eagle; 10-10-2007 at 04:15 AM.

  3. #3
    Join Date
    Oct 2006
    Posts
    345
    i hadn't thought of that, i will have a peek and see if it does what i need

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    cant you just set the window title after after you open noptepad ?
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    Oct 2006
    Posts
    345
    i'd need to affectively do it before opening notepad, becasue of a protection timer running, basically if a certain string is found in the title of any window, it's closed, this can be instantaneous or upto 500 miliseconds, too hit and miss to rely on changing after notepad or default app is opened

    the debug thing looks a posibility, just need to strip the example down to the my basic requirements

  6. #6
    Join Date
    Oct 2006
    Posts
    345
    dam, that was so close, i can get it to do what i want, but i have more than one of these "info" text files, and they could be opened one after another, and unfortunately i cant get the title to switch from the one initially set :(

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    ok, well if you want i could make you a text window (dll popup), it would be basic editor type window with no buttons that you have full control of, set the text and title,

    or the debug window might be just as easy, its up to you


    Aftertought: do you own xDialog, if so you could use the multiline input popup
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Oct 2006
    Posts
    345
    i'm still playing with the debug window thing at the moment, as i like the re-sizable option, however after changing the details/size once, if i open another text file via the same method, while i can clear the contents i cant seem to reset the debug window atributes, even if i close it and then re-open it :(


    i only have the free xDialog lite, so dont know the script code for that multiline input popup your talking of, you got a fast example and i'll see if it looks easier/better than what i am playing with now.


    dll popup sounds interesting, but really it's not worth putting you out for... this is all mu own fault anyway, for scripting a window close command if a certain string is found in the window title and then realising i need to access a path that has this sting in it

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    ok, well i have a prototype here so it wont take me to long to knock something up for you, it gives me something to do and if it helps you then im happy, check back in 20 mins
    Open your eyes to Narcissism, Don't let her destroy your life!!

  10. #10
    Join Date
    May 2006
    Posts
    5,380
    ok, here you go

    this is a custom (read only) debug window, you can set window size, title, text, and type (tool window), you can disable the app (or not) while the debug is shown

    let me know if you need any thing changed
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  11. #11
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    nice one Dean,

    fwiw

    here's a better example of manipulating the builtin Debug Window:
    (check the global functions in project)
    Attached Files

  12. #12
    Join Date
    May 2006
    Posts
    5,380
    you know, iv never used the ams debug window, i had assumed it was like the pb debug (only works from the compiler) so i never used it, i always use dialog.message, but i can see checking my sqlite stuff will be a lot easier with the debug window

    your example thought me something to
    Open your eyes to Narcissism, Don't let her destroy your life!!

  13. #13
    Join Date
    Oct 2006
    Posts
    345
    thanks guys,

    i had to nip out for a bit, and just got back so i've grabbed your examples and will have a look after dinner

    thanks again for the replies and help

    i'll post back my thoughts later

  14. #14
    Join Date
    Oct 2006
    Posts
    345

    Thumbs up

    ok, i've got it .... just some minor stuff to iron out.

    @RizlaUK - i like stand alone things usually so my first inkling was to try your tool, and i will keep it because it will be usefull, especially if i want a dialog message without the annoying audio of the AMS standard message boxes

    But, for this particular project, it fails as i could not read the text in from file to it, it just returned blank, the text is a "notes and revision history" text file, so the object displaying needs to be able to accept a wide ranging input of text formatting, and scroll bars will be needed.

    @Eagle - thank you, i was working along the same lines as what you have there in your example, but i was having the issue of the title not being updated, and having another example to compare, i could see where i went wrong, i was calling for the debug window handle more than once, and then in my code it was still refered to as "debug" at one point insteadof by the handle, and that was causing my issues, all looks good now, just one small issue.....


    as i said, all is good now, except that if i load new text and new title into an existingly visible Debug window, it scrolls the text to the bottom, much in the sam manner as if you had appended it to the end of the existing text, this isnt happening, so i dont fully understand why it is doing this ... i assume it is because the print command is much the same as paste in windows and it will place the cursor at the end.

    I have a couple of thoughts on this, ranging from changing the order of events (add text, change title,, change size) to ensure that the text one isnt last or maybe close the debug window make the changes then show it (as the first instance seems to work ok) to using a send keys cntl+home command straight after calling the debug window to move the cursor to the top


    weither way.... thank you guys very much for your help with this

  15. #15
    Join Date
    Oct 2006
    Posts
    345
    ok, i know know why my code was slower than yours when it came to calling the debug window, placement of this line is crucial, as it will slow all sorts of things down, including the page timer :(

    Code:
    -- Get Debug Window Handle --
    nDBHwnd = Debug.GetWindow(); -- a global var (call once only)
    this is causing me a slight headache in respects as to where to put it, as a lot of my code for this is in the global section. because the text files are being displayed from the task tray icon menu, i've tried in on-preload and on-show, and it messes with the project speed, i'm thinking to hide it's affects by trying to do this while the splash image is displayed during pre-load, that might work, it certainly makes a difference depending on where you put it in the script


    as for the other thing about adding new text to the debug window and it being positioned at the end of the file, closing the window then making the changes and re-opening it sorted that out ... i added "Debug.ShowWindow(false);" into the Debug.SetText Function

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Example: Animating the Window Title Text
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-13-2004, 01:30 PM
  2. DLL to Shell an App and get the Handle to the Window
    By Worm in forum AutoPlay Media Studio 5.0
    Replies: 10
    Last Post: 01-26-2004, 12:18 PM
  3. Starting an App and getting the Window Handle
    By Worm in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 01-25-2004, 06:07 AM
  4. Winamp Window Title
    By nismo505 in forum AutoPlay Media Studio 4.0
    Replies: 20
    Last Post: 08-13-2003, 07:15 AM
  5. How to add an icon to the active title window...
    By darylsewell in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 12-12-2002, 12:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts