English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 23 August 2018, 17:51   #1
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
using "/" char in con: window title

Yo!, another problem happening to me with our (otherwise fine) operating system.

This works fine :
con:0/0/640/100/window title/wait/close

But this, of course, does not, because of extra slash :
con:0/0/640/100/this is a/b window/wait/close

No escape char for this available ?
Using "" just adds the quotes themselves to the title.
Same for *, %, or everything i tried.

If it can't work (as of v39) then what's the exact list of invalid characters here ?
meynaf is offline  
Old 23 August 2018, 19:01   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
AFAIK the only way is to find the window and call SetWindowTitles() to change it, and then you can put slashes in the title, and probably all other printable characters.
Leffmann is offline  
Old 26 August 2018, 08:05   #3
kolla
Banned
 
Join Date: Nov 2007
Location: Trondheim, Norway
Posts: 1,893
I don't want to be Captain Obvious here, but...

con:0/0/640/100/this is a\/b window/wait/close

EDIT: Captain Obvious can report that the above works with ViNCEd CON, but not original CON
kolla is offline  
Old 26 August 2018, 09:12   #4
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by kolla View Post
EDIT: Captain Obvious can report that the above works with ViNCEd CON, but not original CON
Sorry, it's all about original CON: as it needs to work on just every V37+ machine.
meynaf is offline  
Old 26 August 2018, 12:31   #5
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Why does it have to be a forward slash? Cosmetic reasons?
Leffmann is offline  
Old 26 August 2018, 14:08   #6
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Leffmann View Post
Why does it have to be a forward slash? Cosmetic reasons?
Absolutely not. Input string could be just about anything as it's for included reusable code, and i don't like to have forbidden characters.
meynaf is offline  
Old 26 August 2018, 16:09   #7
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Try this:
Code:
BPTR con = Console("con:0/0/400/100", "a close/wait window", "close/wait");


BPTR Console(char* size, char* title, char* flags) {
  char temp[200];
  BPTR con;

  strcpy(temp, size);
  strcat(temp, "/xyz123/");
  strcat(temp, flags);

  con = Open(temp, MODE_NEWFILE);

  if (con) {
    ULONG lock;
    struct Screen* scr;
    struct Window* win;

    lock = LockIBase(0);

    for (scr = IntuitionBase->FirstScreen; scr; scr = scr->NextScreen)
      for (win = scr->FirstWindow; win; win = win->NextWindow)
        if (strcmp("xyz123", win->Title) == 0)
          SetWindowTitles(win, title, -1);

    UnlockIBase(lock);
  }

  return con;
}
Leffmann is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash without Guru when "expanding" Window of CubicIDE tygre support.Apps 5 04 January 2023 03:41
"Voices8" 8 Channel Soundtracker "DemoSongI" song - "This is the Amiga with 8 Voices" DemosongIHunter request.Music 45 23 May 2022 20:07
How to get rid of the FreeWheel Window used for "Classic Boing Ball Mouse MX1000"? VectrexRoli support.Apps 5 21 June 2016 17:45
ClassicWB (FULL) error: "ToolsDaemon could'nt find Workbench window!" andersbm project.ClassicWB 1 05 October 2013 17:09
[Found: Blade Warrior] Need title for a "Samurai" game, mostly black amiman99 Looking for a game name ? 11 26 September 2012 22:01

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:50.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09096 seconds with 15 queries