May-15-2019, 09:17 AM
I am in the process of learning Python. Now I have a concrete challenge I would like to give my self. Once in a while I need to do some changes in a VB-script txt file. I would like to automate those tasks – and here I need your help. Can you help me figure out how to complete the tasks or send me hints or links for what functions to look for. Thank you a lot in advance for taking time ?
This is what I think should be automated:
1. Open the txt file
2. Find these to sentences and insert a “’” in front of the text (to outcomment in VB)
If bStatus Then bStatus=File_ExistFile(gsCommonDesktop & "\Google Chrome.lnk",False)
If bStatus and gbValue=True Then bStatus = File_DelFile(gsCommonDesktop & "\Google Chrome.lnk",TRUE)
3. Find this sentence and change the very last number (1) to the number zero (0)
4. Save the file.
This is what I think should be automated:
1. Open the txt file
2. Find these to sentences and insert a “’” in front of the text (to outcomment in VB)
If bStatus Then bStatus=File_ExistFile(gsCommonDesktop & "\Google Chrome.lnk",False)
If bStatus and gbValue=True Then bStatus = File_DelFile(gsCommonDesktop & "\Google Chrome.lnk",TRUE)
3. Find this sentence and change the very last number (1) to the number zero (0)
4. Save the file.