TweetFollow Us on Twitter

Jul 97 - Tips

Volume Number: 13 (1997)
Issue Number: 7
Column Tag: Tips & Tidbits

Jul 97 - Tips & Tidbits

by Steve Sisak

In article <19970223210019110631@stcc010.ulaval.ca>, <cbrunet@geocities.com> (Charles Brunet) wrote:
When I call FSpDelete in my application, the document is not always deleted from the Finder. Sometime, I must create an other document with the same name to erase it. Is it possible to ask Finder to forget this file right now? I have the same problem when I create a document. It take some time before it appear in the Finder.

How to update the informations in the Finder? If you have a scriptable finder, you can send it an update event. Here is a snippet from an (as of yet) unreleased piece of software:

OSErr
ICTyper::SendFinderAEUpdate(FSSpec &inFile)
{
  OSErr  err = noErr;
  AEDesc   processDesc;
  AppleEvent   ae, aeReply;
  ae.descriptorType = aeReply.descriptorType = processDesc.descriptorType
= typeNull;
  ae.dataHandle = aeReply.dataHandle = processDesc.dataHandle = nil;
  
  Try_ {
   DescType finderType = 'MACS';
   err =
::AECreateDesc(typeApplSignature,&finderType,sizeof(DescType),&processDesc);
   FailOSErr_(err);
   
   err  = ::AECreateAppleEvent('fndr', 'fupd',&processDesc,
                    
kAutoGenerateReturnID,kAnyTransactionID,&ae);
   FailOSErr_(err);
   
   err =
::AEPutParamPtr(&ae,keyDirectObject,typeFSS,&inFile,sizeof(inFile));
   FailOSErr_(err);

   err = ::AESend(&ae,&aeReply, kAENoReply | kAENeverInteract,
kAENormalPriority,
        kAEDefaultTimeout,nil,nil);
   FailOSErr_(err);
  }
  Catch_(catchErr) {err = catchErr;} EndCatch_
  
  if (processDesc.descriptorType != typeNull) :AEDisposeDesc(&processDesc);
  if (ae.descriptorType != typeNull) ::AEDisposeDesc(&ae);
  if (aeReply.descriptorType != typeNull) :AEDisposeDesc(&aeReply);
  return err;
}

Jim Correia
pmth02jc@umassd.edu


Screen Shots the Gnarly Way

One thing you can't do on the standard MacOS today is take a screen snapshot with a menu being displayed (or indeed, with the mouse down). There are lots of third-party solutions to this, but in fact there is a way to get such a screen snapshot, by installing no additional software other than MacsBug. And since all readers of this magazine already have MacsBug installed (well, don't you?), that means you can indeed take screen snapshots with menus displayed on your Mac!

CAUTION: this technique can crash your machine, or have other unexpected consequences. Perhaps you should look on it as Another Fun Thing to Do With MacsBug, to show off to your fellow geeks at parties, rather than as a serious technique for regular use.

First of all, type cmd-shift-3 to invoke the standard screen snapshot FKEY. This is purely to make sure the FKEY code is loaded in memory; you can throw away the PICT file it creates at this point. Next, hold down the mouse button to display the menu that you want to take a snapshot of. While still holding the button down, use your other hand to press the interrupt button (or key sequence) to break into MacsBug. Once the MacsBug screen appears, you can release the mouse button.

Use the "hx" command, if necessary, to switch to the system heap. Now use the command

 hd FKEY

to find out where the code for FKEY 3 is loaded. You will see a display that looks something like this:

 Displaying the System heap at 00002000
   Start  Length   Tag Mstr Ptr Lock Prg Type  ID  File   Name
  0038F52C 0000046C+08  R  0019DA1C    P  FKEY 0003 0002
 #1 block listed, which uses #1152 bytes, storing #1132 bytes

(If you see more than one FKEY loaded, the one you want will have "0003" under the ID column.) Make a note of the hexadecimal number under "Start" -- that is the start address of the FKEY code. Next, enter the following commands:

 sp := sp-4
 sl sp pc
 pc := xxxxxxxx

(replace the "xxxxxxxx" with the start address of FKEY 3 you obtained before.) Finally, enter the command "g" to resume execution. You should hear the click of the snapshot being taken, followed by the disappearance of the menu that was being displayed. But if you have a look at the resulting snapshot PICT file, you will see that it shows the menu!

Assuming your machine stays up that long (hee-hee)...

Lawrence D'Oliveiro
LDO@waikato.ac.nz

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Hazel 5.3 - Create rules for organizing...
Hazel is your personal housekeeper, organizing and cleaning folders based on rules you define. Hazel can also manage your trash and uninstall your applications. Organize your files using a familiar... Read more
Duet 3.15.0.0 - Use your iPad as an exte...
Duet is the first app that allows you to use your iDevice as an extra display for your Mac using the Lightning or 30-pin cable. Note: This app requires a iOS companion app. Release notes were... Read more
DiskCatalogMaker 9.0.3 - Catalog your di...
DiskCatalogMaker is a simple disk management tool which catalogs disks. Simple, light-weight, and fast Finder-like intuitive look and feel Super-fast search algorithm Can compress catalog data for... Read more
Maintenance 3.1.2 - System maintenance u...
Maintenance is a system maintenance and cleaning utility. It allows you to run miscellaneous tasks of system maintenance: Check the the structure of the disk Repair permissions Run periodic scripts... Read more
Final Cut Pro 10.7 - Professional video...
Redesigned from the ground up, Final Cut Pro combines revolutionary video editing with a powerful media organization and incredible performance to let you create at the speed of thought.... Read more
Pro Video Formats 2.3 - Updates for prof...
The Pro Video Formats package provides support for the following codecs that are used in professional video workflows: Apple ProRes RAW and ProRes RAW HQ Apple Intermediate Codec Avid DNxHD® / Avid... Read more
Apple Safari 17.1.2 - Apple's Web b...
Apple Safari is Apple's web browser that comes bundled with the most recent macOS. Safari is faster and more energy efficient than other browsers, so sites are more responsive and your notebook... Read more
LaunchBar 6.18.5 - Powerful file/URL/ema...
LaunchBar is an award-winning productivity utility that offers an amazingly intuitive and efficient way to search and access any kind of information stored on your computer or on the Web. It provides... Read more
Affinity Designer 2.3.0 - Vector graphic...
Affinity Designer is an incredibly accurate vector illustrator that feels fast and at home in the hands of creative professionals. It intuitively combines rock solid and crisp vector art with... Read more
Affinity Photo 2.3.0 - Digital editing f...
Affinity Photo - redefines the boundaries for professional photo editing software for the Mac. With a meticulous focus on workflow it offers sophisticated tools for enhancing, editing and retouching... Read more

Latest Forum Discussions

See All

New ‘Zenless Zone Zero’ Trailer Showcase...
I missed this late last week, but HoYoverse released another playable character trailer for the upcoming urban fantasy action RPG Zenless Zone Zero. We’ve had a few trailers so far for playable characters, but the newest one focuses on Nicole... | Read more »
Get your heart pounding quicker as Autom...
When it comes to mobile battle royales, it wouldn’t be disrespectful to say the first ones to pop to mind would be PUBG Mobile, but there is one that perhaps doesn’t get the worldwide recognition it should and that's Garena’s Free Fire. Now,... | Read more »
‘Disney Dreamlight Valley Arcade Edition...
Disney Dreamlight Valley Arcade Edition () launches beginning Tuesday worldwide on Apple Arcade bringing a new version of the game without any passes or microtransactions. While that itself is a huge bonus for Apple Arcade, the fact that Disney... | Read more »
Adventure Game ‘Urban Legend Hunters 2:...
Over the weekend, publisher Playism announced a localization of the Toii Games-developed adventure game Urban Legend Hunters 2: Double for iOS, Android, and Steam. Urban Legend Hunters 2: Double is available on mobile already without English and... | Read more »
‘Stardew Valley’ Creator Has Made a Ton...
Stardew Valley ($4.99) game creator Eric Barone (ConcernedApe) has been posting about the upcoming major Stardew Valley 1.6 update on Twitter with reveals for new features, content, and more. Over the weekend, Eric Tweeted that a ton of progress... | Read more »
Pour One Out for Black Friday – The Touc...
After taking Thanksgiving week off we’re back with another action-packed episode of The TouchArcade Show! Well, maybe not quite action-packed, but certainly discussion-packed! The topics might sound familiar to you: The new Steam Deck OLED, the... | Read more »
TouchArcade Game of the Week: ‘Hitman: B...
Nowadays, with where I’m at in my life with a family and plenty of responsibilities outside of gaming, I kind of appreciate the smaller-scale mobile games a bit more since more of my “serious" gaming is now done on a Steam Deck or Nintendo Switch.... | Read more »
SwitchArcade Round-Up: ‘Batman: Arkham T...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for December 1st, 2023. We’ve got a lot of big games hitting today, new DLC For Samba de Amigo, and this is probably going to be the last day this year with so many heavy hitters. I... | Read more »
Steam Deck Weekly: Tales of Arise Beyond...
Last week, there was a ton of Steam Deck coverage over here focused on the Steam Deck OLED. | Read more »
World of Tanks Blitz adds celebrity amba...
Wargaming is celebrating the season within World of Tanks Blitz with a new celebrity ambassador joining this year's Holiday Ops. In particular, British footballer and movie star Vinnie Jones will be brightening up the game with plenty of themed in-... | Read more »

Price Scanner via MacPrices.net

Apple M1-powered iPad Airs are back on Holida...
Amazon has 10.9″ M1 WiFi iPad Airs back on Holiday sale for $100 off Apple’s MSRP, with prices starting at $499. Each includes free shipping. Their prices are the lowest available among the Apple... Read more
Sunday Sale: Apple 14-inch M3 MacBook Pro on...
B&H Photo has new 14″ M3 MacBook Pros, in Space Gray, on Holiday sale for $150 off MSRP, only $1449. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8-Core M3 MacBook Pro (8GB... Read more
Blue 10th-generation Apple iPad on Holiday sa...
Amazon has Apple’s 10th-generation WiFi iPad (in Blue) on Holiday sale for $349 including free shipping. Their discount applies to WiFi models only and includes a $50 instant discount + $50 clippable... Read more
All Apple Pencils are on Holiday sale for $79...
Amazon has all Apple Pencils on Holiday sale this weekend for $79, ranging up to 39% off MSRP for some models. Shipping is free: – Apple Pencil 1: $79 $20 off MSRP (20%) – Apple Pencil 2: $79 $50 off... Read more
Deal Alert! Apple Smart Folio Keyboard for iP...
Apple iPad Smart Keyboard Folio prices are on Holiday sale for only $79 at Amazon, or 50% off MSRP: – iPad Smart Folio Keyboard for iPad (7th-9th gen)/iPad Air (3rd gen): $79 $79 (50%) off MSRP This... Read more
Apple Watch Series 9 models are now on Holida...
Walmart has Apple Watch Series 9 models now on Holiday sale for $70 off MSRP on their online store. Sale prices available for online orders only, in-store prices may vary. Order online, and choose... Read more
Holiday sale this weekend at Xfinity Mobile:...
Switch to Xfinity Mobile (Mobile Virtual Network Operator..using Verizon’s network) and save $500 instantly on any iPhone 15, 14, or 13 and up to $800 off with eligible trade-in. The total is applied... Read more
13-inch M2 MacBook Airs with 512GB of storage...
Best Buy has the 13″ M2 MacBook Air with 512GB of storage on Holiday sale this weekend for $220 off MSRP on their online store. Sale price is $1179. Price valid for online orders only, in-store price... Read more
B&H Photo has Apple’s 14-inch M3/M3 Pro/M...
B&H Photo has new Gray and Black 14″ M3, M3 Pro, and M3 Max MacBook Pros on Holiday sale this weekend for $100-$200 off MSRP, starting at only $1499. B&H offers free 1-2 day delivery to most... Read more
15-inch M2 MacBook Airs are $200 off MSRP on...
Best Buy has Apple 15″ MacBook Airs with M2 CPUs in stock and on Holiday sale for $200 off MSRP on their online store. Their prices are among the lowest currently available for new 15″ M2 MacBook... Read more

Jobs Board

Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Senior Product Manager - *Apple* - DISH Net...
…Responsibilities** We are seeking an ambitious, data-driven thinker to assist the Apple Product Development team as our Wireless Product division continues to grow Read more
Senior Product Manager - *Apple* - DISH Net...
…Responsibilities** We are seeking an ambitious, data-driven thinker to assist the Apple Product Development team as our Wireless Product division continues to grow Read more
Senior Software Engineer - *Apple* Fundamen...
…center of Microsoft's efforts to empower our users to do more. The Apple Fundamentals team focused on defining and improving the end-to-end developer experience in Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.