Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Studio
  4. Update File Text

Update File Text

Scheduled Pinned Locked Moved Visual Studio
helpannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duane in Japan
    wrote on last edited by
    #1

    I think that this task will take a few trys to explain very well, thanks in advance for any help. I have a VB Studio '05 Project built, it does some math for me and shows the results I need in several textboxes. I want to get one result from textbox 'A1'. I want to drill down into my folders and files to replace this number from 'A1' into my Macro Recorder text. The very last line of code in the Macro Recorder has {repeat 45}. I wish to take the new number from VB Studio textbox 'A1', drill down through folders and files to C:\Program Files\Aldo's Macro Recorder\MACROS\A1..........go into 'A1' macro file, FIND {repeat 45} and REPLACE the number to whatever the new number is from my VB Studio project. I have seen nothing like this in my research on several sites and hours of MSDN training videos. Double D....

    E 1 Reply Last reply
    0
    • D Duane in Japan

      I think that this task will take a few trys to explain very well, thanks in advance for any help. I have a VB Studio '05 Project built, it does some math for me and shows the results I need in several textboxes. I want to get one result from textbox 'A1'. I want to drill down into my folders and files to replace this number from 'A1' into my Macro Recorder text. The very last line of code in the Macro Recorder has {repeat 45}. I wish to take the new number from VB Studio textbox 'A1', drill down through folders and files to C:\Program Files\Aldo's Macro Recorder\MACROS\A1..........go into 'A1' macro file, FIND {repeat 45} and REPLACE the number to whatever the new number is from my VB Studio project. I have seen nothing like this in my research on several sites and hours of MSDN training videos. Double D....

      E Offline
      E Offline
      Expert Coming
      wrote on last edited by
      #2

      I am not sure how macro files are made or what format they are in. Try looking into FileReader/FileWriter. I don't know what language you are programming in, those are for C#. Drilling down the directories is very easy and with those classes you will see why. If you are programming in C# you can use the classes above to read the file, find the section you want to change, change it, then write to the file.

      The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

      D 1 Reply Last reply
      0
      • E Expert Coming

        I am not sure how macro files are made or what format they are in. Try looking into FileReader/FileWriter. I don't know what language you are programming in, those are for C#. Drilling down the directories is very easy and with those classes you will see why. If you are programming in C# you can use the classes above to read the file, find the section you want to change, change it, then write to the file.

        The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

        D Offline
        D Offline
        Duane in Japan
        wrote on last edited by
        #3

        Sorry, I am in VB Studio 05, I am still a NOOB and I built a calculator project, the sums that I came up with are used to the a Macro how many times to {REPEAT xx}. Since my first question I have learned that in order to get into this MACRO I must first open Notepad to view it, do a FIND for REPEAT then replace the numbers after it, since they will always be different I have no clue with my current experience on how to drill down to my file, open up Notepad, do the search, find and replace the text of choice, then I hope that it will work of course and I will learn something in the process. I just did a little video training online about MY Namespaces, this may help a little to get directly to the folder but I think I will have to concatenate the name of the macro and do all the events required to find and replace the text of choice. I have seen no training on this, like you mentioned, the macro file itself is in some other format directly, but viewing it in Notepad works great. I am just trying to do the job I do everyday programically and I need serious help please. This is a hobby task by the way, it used to take about 20 minutes by hand, I would like to get it down to 5.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups