OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-05-2008, 12:45
bprice's Avatar
bprice bprice is offline
Member
 
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default Search GMS File

Hey Everyone,
I made a small "updater" for GMS files over a network. It works great, however I'd like to try and make it only copy a GMS file based on a specific computer. If I put Y.GMS in a folder on the server, users A & C will use it, and users B & D don't need it. The way I have it working now, users A,B,C,D all get the GMS file.

What I'm curious to know is, if I create a module inside my GMS with a set of names in it... and names only (just text for example), is there a way to have one GMS (my updater on everyones machine) run code that searches text of another GMS file (the file on the server thats updated)?

Basically, my GMS file runs and says if X Module in Y.GMS file contains the text ABC, and my machine name equals ABC, copy Y.GMS file to my computer!

I have the script done for the file copying, and the machine name identification... I'm just wondering if there is an easy way to have one GMS file search another for text!

Any help would be appreciated!

Thanks in advance!
B
Reply With Quote
  #2  
Old 09-05-2008, 13:02
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

gms file is partly compressed, so you can add the names text, save the gms and view the contents in any plaintext viewer, then search for some parts of the words - some unique character sequences, but make sure to search for short ones, because the text almost always is 'broken'

if this won't help then you'll need to dynamically load the remote gms using VGCore reference library support (quite easy :-), then process it with some VBIDE treaks (easy, as well).

Of course the first case is much easier to implement (not tested, may contain misspellings :-)
Code:
'read the gms file contents into a string variable
dim handle#, txt$
handle=freefile()
open "\\server\share\folder\macrofile.gms" for binary access read shared as #handle
txt=space$(LOF(handle))
get #handle,,txt
close #handle

'search the contents
if instr(1,txt,"Pattern1",vbTextCompare) then
'found
endif
p.s.
sorry for not helping you with the issues you mentioned in an email, it's just out of my schedule
Reply With Quote
  #3  
Old 13-05-2008, 08:49
bprice's Avatar
bprice bprice is offline
Member
 
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default

Thanks Os,
I'll give this a try! I didn't realize a GMS file was compressed at all... this is good to know!

No problem on the other thing... I've started working on it myself and hopefully I can get it finished!

B
Reply With Quote
Reply


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

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can convert GMS file unviewable??!!! bb CorelDRAW/Corel DESIGNER VBA 13 14-01-2011 01:40
Global Macro delete Michael Cervantes CorelDRAW/Corel DESIGNER VBA 17 16-11-2010 08:11
Version file Search Booker General 3 24-01-2006 09:34
how can convert GMS file unviewable??!!! bb CorelDRAW/Corel DESIGNER VBA 0 29-03-2005 19:31
What is a GMS file? sergent CorelDRAW/Corel DESIGNER VBA 1 12-06-2003 17:57


All times are GMT -5. The time now is 11:35.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com