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

VLC Media Player 3.0.13 - Popular multim...
VLC Media Player is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, MP3, OGG, ...) as well as DVDs, VCDs, and various streaming protocols. It... Read more
Kodi 19.1 - Powerful media center tool f...
Kodi (was XBMC) is an award-winning free and open-source (GPL) software media player and entertainment hub that can be installed on Linux, OS X, Windows, iOS, and Android, featuring a 10-foot user... Read more
CloudApp 6.5.2 - Video screen recorder,...
CloudApp is an instant video and image sharing platform for professionals. CloudApp is the fastest way to capture and embed video, GIFs, screencasts, and marked-up images throughout business... Read more
CloudApp (Business) 6.5.2 - Video screen...
CloudApp is an instant video and image sharing platform for professionals. CloudApp is the fastest way to capture and embed video, GIFs, screencasts, and marked-up images throughout business... Read more
MarsEdit 4.4.13 - Quick and convenient b...
MarsEdit is a blog editor for OS X that makes editing your blog like writing email, with spell-checking, drafts, multiple windows, and even AppleScript support. It works with with most blog services... Read more
Hype 4.1.6 - $49.99
Create stunning animated and interactive web content with Hype. Hype’s HTML5 output works on all modern browsers and mobile devices like iPhones and iPads. No coding required. Hype’s free download... Read more
LibreOffice 7.1.3.2 - Free, open-source...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
War Thunder 2.5.1.111 - Multiplayer war...
In War Thunder, aircraft, attack helicopters, ground forces and naval ships collaborate in realistic competitive battles. You can choose from over 1,500 vehicles and an extensive variety of combat... Read more
djay Pro 3.1 - Transform your Mac into a...
djay Pro provides a complete toolkit for performing DJs. Its unique modern interface is built around a sophisticated integration with iTunes and Spotify, giving you instant access to millions of... Read more
OmniPlan 4.2.6 - Professional-grade proj...
With OmniPlan, you can create logical, manageable project plans with Gantt charts, schedules, summaries, milestones, and critical paths. Break down the tasks needed to make your project a success,... Read more

Latest Forum Discussions

See All

New update for The Survivalists brings n...
Team17 has updated its survival co-operative game The Survivalists with lots of new content, including the introduction of new crops, improved combat and more changes. The new patch is available now on iOS via Apple Arcade. [Read more] | Read more »
Bike Baron 2 opens pre-orders for iOS wi...
Whether it’s dodging spiky death traps or spinning through gigantic loops in the air, Bike Baron 2 has enough action to keep both newbie and veteran players hanging onto the edge of their seats. The much-awaited sequel to Cornfox & Brothers’s... | Read more »
MU Archangel: Everything we know about M...
As if the global release of MU Archangel isn’t exciting enough, we’ve got even more reasons to get hyped for Webzen’s mobile spin-off to MU Online. If you just can’t wait to pour out blood, sweat, and tears in strategizing your character’s best... | Read more »
Wild Rift will have a global esports tou...
Riot Games has announced that there will be a global esports tournament for their popular mobile MOBA, League of Legends: Wild Rift, later this year. This will see regional teams across the globe competing to earn a place in a tourney in late 2021... | Read more »
A Scrub's Guide to League of Legend...
Like all popular competitions, League of Legends: Wild Rift has developed a set of unwritten rules about how to play it well. These rules are known as the metagame or "meta," and understanding why they exist and how to take advantage of them is a... | Read more »
A Scrub's Guide to League of Legend...
I'm relatively new to League of Legends, but have played a fair amount of MOBAs in the past. Wild Rift has really captured my attention, though, and I've found myself sinking a lot of time into practicing and reading up on how to improve my game. | Read more »
Golf Impact is a new mobile sports game...
Neowiz has launched Golf Impact, a new competitive sports game for iOS and Android devices. [Read more] | Read more »
The best run-based games on iOS
The release of Returnal has caused me to revisit this list of the best run-based games on mobile. For the most part, run-based games are really great for mobile, because they provide a lot of depth and satisfying gameplay in a relatively bite-... | Read more »
Immersive horror game Under: Depths of F...
Rogue Games has released Under: Depths of Fear, its immersive first-person survival horror game for iOS devices. The game had previously been released on PC via Steam late last year, and is now available as paid title on the iOS App Store. [Read... | Read more »
A Scrub's Guide to League of Legend...
MOBAs are nothing new. They aren't even new to me. I've played just about every MOBA there is (mobile or otherwise) with varying amounts of time investment, with my previous favorites being Vainglory and Arena of Valor. But League of Legends: Wild... | Read more »

Price Scanner via MacPrices.net

Gazelle drops prices on Apple iPhone 12 model...
Gazelle has dropped prices on a full range of discounted, refurbished, unlocked Apple iPhone 12 models by up to $100 with models now available starting at $619. iPhones are offered in Fair, Good, and... Read more
Apple’s new 24″ M1 iMac on sale for up to $86...
Apple reseller Expercom is accepting 24″ M1 iMac preorders for $66-$86 off Apple’s MSRP, with prices starting at $1233. Shipping is free. Expercom is estimating delivery in 3-6 weeks: – 24″ M1 iMac 8... Read more
Amazon drops AirPods price to only $119 this...
Amazon has dropped prices on Apple AirPods (wired charging case) this weekend to a low of only $119.99 shipped. Amazon’s price is $40 off Apple’s MSRP, and it’s the lowest price available for new... Read more
10.9″ WiFi iPad Airs on sale for $50 off Appl...
Apple reseller Datavision has new 2020 10.9″ WiFi iPad Airs in stock today and on sale for $50 off Apple’s MSRP, starting at $549, each including free shipping. In addition, DataVision charges sales... Read more
Week’s Best MacBook Deals: 13″ M1 MacBook Air...
Apple resellers are offering sale prices on M1-powered 13″ MacBook Airs ranging up to $190 off MSRP this weekend. Get one today starting as low as $849: 8-Core M1 Silicon CPU, 7-Core GPU. MSRP: $999... Read more
Week’s Best Deals: 13″ M1 MacBook Pros for up...
Apple and its resellers are offering sale prices on new and refurbished M1-powered 13″ MacBook Pros ranging up to $230 off MSRP. Here are this week’s best deals: 13″ M1 MacBook Pro/256GB SSD. MSRP: $... Read more
Sams Club Sales Event: $50-$70 off Apple Watc...
Sams Club has Apple Watch Series 6 GPS models on sale for $50-$70 off Apple’s MSRP this week. $45 Sams Club Membership required. Note that sale prices are for online orders only, in-store prices may... Read more
Apple has iPhones available starting at $469...
Apple has a range of Certified Refurbished iPhones available today starting at only $469. Apple includes a standard one-year warranty, new outer shell, and shipping is free. According to Apple, “Each... Read more
M1 Mac minis in stock and on sale for up to $...
Apple reseller Expercom has M1 Mac minis in stock and on sale today for up to $46 off MSRP, starting at $663. Shipping is free. Purchase an AppleCare+ plan along with your mini for only $82, save $70... Read more
M1 Mac minis available for as little as $589...
Apple has a full line of standard configuration M1 Mac minis available in their Certified Refurbished section starting at only $589 and up to $140 off MSRP. Each mini comes with Apple’s one-year... Read more

Jobs Board

Teller at *Apple* Valley (40 hours) - Wells...
…+ Ability to work weekends and holidays as needed or scheduled **Street Address** **MN- Apple Valley:** 14325 Cedar Ave - Apple Valley, MN **Disclaimer** All Read more
Cub Foods - *Apple* Valley - Now Hiring Par...
Cub Foods - Apple Valley - Now Hiring Part Time! United States of America, Minnesota, Apple Valley New Retail Post Date 4 days ago Requisition # 131583 Sign Up Read more
Geek Squad *Apple* Consultation Professiona...
**805458BR** **Job Title:** Geek Squad Apple Consultation Professional **Job Category:** Store Associates **Store Number or Department:** 000209-Westminster-Store Read more
*Apple* Mobility Specialist - Best Buy (Unit...
**801657BR** **Job Title:** Apple Mobility Specialist **Job Category:** Store Associates **Store Number or Department:** 001764-Downingtown-Store **Job Read more
Teller at *Apple* Valley (40 hours) - Wells...
…+ Ability to work weekends and holidays as needed or scheduled **Street Address** **MN- Apple Valley:** 14325 Cedar Ave - Apple Valley, MN **Disclaimer** All Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.