NOTE -- lengthy lordy, lordy, lordy..... just can't believe how much people think that throwing a wheelbarrow full of paper with pictures of dead presidents at a problem will magically fix the problem[s].
What I'm I running Linux, with VMware [virtual machine] [http://www.vmware.com] with a licensed but older copy of Win2k as a VM and another VM with my favorite linux distro, where I do all web work and the Win2k for MapInfo. [do get a DualCore process so you can really do 2 things at once] All works great including MapInfo and MapBasic [even on single core processor] So, here are 2 methods of dealing with "not having" MapBasic and for FREE 1) goto ScriptBuilder and get it http://www.volkoff.ru [it is a clean site and software despite the RU site] click the download section and get ScriptBuilder v1.2 been using it since 1998 [v0.x] Now you can write in VBscript, DELPHIscript, or any other scripting engine you have installed on your peecee, even PERL or PYTHON Just a 4.1 meg download fits the definition "FREE and OPEN" software but no "SOURCE code" no registration no reboot just works download once, install on all machines, put SBA [source code] in a shared/server folder for all to use [or install the run-time and link the SBA to it] 2) goto Microsoft and get VB 2005 Express http://msdn.microsoft.com/vstudio/express/vb/download/ This is a small shell downloader and gets a hefty 311+ meg install or worse go ahead do SQL Express for another 55meg It requires uninstalling SQL 2005, VB 2005 and DotNot v2 first and will need 2-4 reboots to get done The worst is you have to create a "junk-mail" account and register Make everyone "eat the bad fortune" and download/instal their "very own version" VB [wreck your bandwidth and email server registration/adware] Or install all the "run-time" junk and polute their machine with more junkware Good Luck Your On Your Own From Here [GLYOYOFH] Bite my tongue and rip my nails out with pliers, I put this M$ warez program on my clean 'dohze machine [have not had VB5 installed for years] but it does work and so does SB So in the spirit of "FREE and OPEN" which is about "choice" you pick from the above 4meg and keep you first born or 350++meg and get cruicified by M$ Below is a test code example that will work in both SB and VB There are more VB examples on my website http://www.wap3.com/download and you can get my project folder for SB [unzip to a folder named "projects" under your SB install folder] http://wap3.com/download/sb-projects.zip Well maybe one weekend [14 day today] I'll put a whole section on the web about using SB as an "alternative" along with other stuff the is "OPEN". ======== BEGIN TEST CODE ======== '**************************************************' ' Application: AttachMI ' ' Created: 07/04/2001 ' '**************************************************' dim miMap dim miStr Sub Button1Click(Sender) Set mimap = GetObject( , "MapInfo.Application") mimap.do "Print chr$(12)" miStr="Print ""VB TEST--Attach To MI"" " mimap.do miStr mimap.do "DIM x AS Integer" mimap.do "x=123" mistr = mimap.eval("x") mimap.do "PRINT "+miStr mimap.do "UNDIM x" set mimap = nothing End Sub ========== END TEST CODE ========== On Wed 06 Sep 2006 08:12, Hughes, Colleen / Don Mitchell wrote: > Thanks Bill, Uffe, and Trey, > > Looks like I'm stuck. This job is only a temporary to fill in for > someone else, and they don't like programming. So the only programming > tools I have are the free ones like JAVA, C#, etc, which I don't know > well enough to integrate into MapInfo. I know enough VB to get by, but > I don't have a license for it. I think I should look into getting a > license for at home so I don't lose what skills I have. > > In the mean time, I can create some small bits of code that will help in > other tasks and they will work in the MB window. > > Trey's suggestion helps, but I was hoping to be able to just run the > code once and have done with it. There are a lot of records and > different object styles to apply. I thought I would try to make things > easier for my predecessor when she returns. > > Anyways, thanks again. > _________________________ > Don Mitchell > > GIS Technician (IMS) > City of St.Thomas > > Message: 3 > Date: Sun, 3 Sep 2006 07:48:10 +0200 > From: "Uffe Kousgaard" <[EMAIL PROTECTED]> > Subject: Re: [MI-L] Looping in MapInfo MapBasic Window > To: "mapinfo-l" <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > > From: Hughes, Colleen / Don Mitchell > > > > Is it possible to perform looping or to test for things (like If Then) > > > > from the MapBasic window. > > No, but you can use automation, i.e. use VB for instance for calling the > mapbasic commands and then use VB logic for looping and if-then. > Examples on how to do this, can be seen in the mapbasic folder, but I'm > not sure how to get access to that without mapbasic? > > Kind regards > > Uffe Kousgaard > www.routeware.dk > > > > ------------------------------ > > Message: 4 > Date: Sun, 3 Sep 2006 06:30:23 -0600 > From: Bill Thoen <[EMAIL PROTECTED]> > Subject: Re: [MI-L] Looping in MapInfo MapBasic Window > To: "Hughes, Colleen / Don Mitchell" <[EMAIL PROTECTED]> > Cc: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=us-ascii > > Looks like several messages posted several days ago are finally coming > up... > > Anyway, you can't do any looping or branching in the MapBasic window; > you have to get MapBasic to do that, sorry. > > > On Thu, Aug 31, 2006 at 09:35:07AM -0400, Hughes, Colleen / Don Mitchell > > wrote: > > Hi All, > > > > I'm slowly trying to learn MapBasic with the MapBasic window in > > MapInfo and the User Guides for MapBasic that I downloaded. I'm > > trying to change the symbol for a selection using mapbasic. When I > > look up the commands in the reference guide, it states that the Do > > While statement isn't supported in the MapBasic window, nor is any of > > the other looping statements nor is the If Then statement. Is it > > possible to perform looping or to test for things (like If Then) from > > the MapBasic window. > > > I don't have Mapbasic, other than from within MapInfo, but thought I > > could write some simple scripts to automate some of the repetitive > > tasks I have and just copy them into the mapbasic window to run them. > > > > The code that I have so far: > > > > ---------------------------------------------------------------------- > > -- > > ----------------------------- > > select * from OverDue where Due_Tested = "NO BFP" into NoBFPtab Dim > > bfpobj As Object, bfpsymbol As Symbol bfpsymbol = MakeSymbol(34,0,6) > > Fetch First From NoBFPtab Do While Not EOT(NoBFPtab) > > bfpobj = NoBFPtab.obj > > Alter Object bfpobj > > Info OBJ_INFO_SYMBOL, bfpsymbol > > Update NoBFPtab Set obj = bfpobj > > Fetch Next From NoBFPtab > > ---------------------------------------------------------------------- > > -- > > ----------------------------- > > > > Any help is be appreciated. > > Don > > > > _______________________________________________ > > MapInfo-L mailing list > > [email protected] > > http://www.directionsmag.com/mailman/listinfo/mapinfo-l > > ------------------------------ > > Message: 5 > Date: Sun, 3 Sep 2006 10:34:57 -0500 > From: Trey Pattillo <[EMAIL PROTECTED]> > Subject: Re: [MI-L] Looping in MapInfo MapBasic Window > To: [email protected] > Cc: "Hughes, Colleen / Don Mitchell" <[EMAIL PROTECTED]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > leaving the mapbasic window open is one of the best ways to learn what > is going on behind the scene > > a big drawback is that some the most complex commands, such as changing > an object style [in your case], is not displayed so you will need some > help there and also a list of the command values from mapbasic > definition file [.def] to reference such as for ObjectInfo(obj, 1) > returns the object type where 1 is refered to as OBJ_INFO_TYPE > > you can do some basic loop if your work is on a small amount of rows > which might be in your case of processing for OverDue records I'm > talking about on doing this one something less than maybe 100 records > > you just highlight all the rows to "run" and hit enter > > '[highlight these only 1 DIM per line though] Dim bfpobj As Object Dim > bfpsymbol As Symbol select * from OverDue where Due_Tested = "NO BFP" > into NoBFPtab fetch first from NoBFPtab '[end highlight above] > > '[highlight these and just keep hitting enter] [would be the DO/WHILE > line] bfpobj = NoBFPtab.obj Alter Object bfpobj Info OBJ_INFO_SYMBOL, > bfpsymbol Update NoBFPtab Set obj = bfpobj Fetch Next From NoBFPtab > '[end highlight above] [would be the END/WEND line] > > '[do these when finished] > UNDim bfpobj > UNDim bfpsymbol > '[end finish] > > you can also use a integer counter in the same manner DIM iRow as > Integer '[begin highlight] > iRow=1 > '.... > '......processing statements here > '.. like FETCH Rec iRow From TableName > '.... > iRow=iRow+1 > '[end highlight] > UNDim iRow > > The UNDIM is used only in MB-Window and Integrated Mapping > [VB,Delphi,...] If you do not run it if another application later on > tries to use it the application will fail [already defined] and also if > a program is running and you happen to pick a name that is in use your > DIM will fail and using UNDIM will cause the application to fail [not > available for app] > > You can save the MapBasic Window to a text file but the MB-Window does > not have a "load from" so open the text file in NotePad and copy/paste > to the window to have reusable code > > Also in SQL Query you can save/load the query, although the file has a > special format it is text and makes sense so you can use it as a > template, of course if the MB-Win is open then you get the full command. > > On Thu 31 Aug 2006 08:35, Hughes, Colleen / Don Mitchell wrote: > > Hi All, > > > > I'm slowly trying to learn MapBasic with the MapBasic window in > > MapInfo and the User Guides for MapBasic that I downloaded. I'm > > trying to change the symbol for a selection using mapbasic. When I > > look up the commands in the reference guide, it states that the Do > > While statement isn't supported in the MapBasic window, nor is any of > > the other looping statements nor is the If Then statement. Is it > > possible to perform looping or to test for things (like If Then) from > > the MapBasic window. > > > I don't have Mapbasic, other than from within MapInfo, but thought I > > could write some simple scripts to automate some of the repetitive > > tasks I have and just copy them into the mapbasic window to run them. > > > > The code that I have so far: > > > > ---------------------------------------------------------------------- > > -- > > ----------------------------- > > select * from OverDue where Due_Tested = "NO BFP" into NoBFPtab Dim > > bfpobj As Object, bfpsymbol As Symbol bfpsymbol = MakeSymbol(34,0,6) > > Fetch First From NoBFPtab Do While Not EOT(NoBFPtab) > > bfpobj = NoBFPtab.obj > > Alter Object bfpobj > > Info OBJ_INFO_SYMBOL, bfpsymbol > > Update NoBFPtab Set obj = bfpobj > > Fetch Next From NoBFPtab > > ---------------------------------------------------------------------- > > -- > > ----------------------------- > > > > Any help is be appreciated. > > Don > > -- > Trey Pattillo > > Failure is not an option.... > It comes standard with all Microsoft products. > > > ------------------------------ > > _______________________________________________ > MapInfo-L mailing list > [email protected] > http://www.directionsmag.com/mailman/listinfo/mapinfo-l > > > End of MapInfo-L Digest, Vol 11, Issue 5 > **************************************** > > _______________________________________________ > MapInfo-L mailing list > [email protected] > http://www.directionsmag.com/mailman/listinfo/mapinfo-l -- Trey Pattillo Failure is not an option.... It comes standard with all Microsoft products. _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
