I'm using PowerBuilder 10.5 and as a newbie I'm a bit stuck and since Google isn't giving me a satisfying answer I'm asking some advice from the Stack Overflow group.
I have a Rich Text Edit field in which the user can write something, insert pictures and so forth. Once finished, he goes to the „Search“ command button and clicking it searches for the batch file that will suit his needs (copy that text into an existing word document, create a new word and place the folder on web, and so fort – there are 6 different batches). The code in the clicked event of „Search“ command button is this:
String ls_s
GetFileOpenName('PB_app', ls_s, ls_s, 'BAT', "Win Batch Files (*.BAT),*.BAT", 'C:\Programs\Test')
And here come my problems: I can't connect my app and the selected batch file. I'd like the path of the selected batch file to be visible in the Single Line Edit filed, but I have no idea how to get there, not to mention I'm point blank at how to connect PB app, batch file, how to even say to the batch file – „That text in rich text edit field is the one you have to work with?“…?
So I need some advice, guidance, perhaps some links or names of any literature that would help me understand how it should be done. I've lost two days and got nowhere, and I just need some piece of advice to get me going…
Your problem is that the original programmer used one variable for two return values. If you declare a new string variable and pass it instead of the first ls_s, you'll see this will return you the path. If you run into trouble, PB has a good help file (and the manuals are also online) which covers GetFileOpenName().
Good luck,
Terry
Related
I have a file that can be opened thru notepad application.
Basically, this file(which can be opened thru notepad) is created by a software and that software uses the values inside that file to run. You can edit the values inside the file using its software.
I just want specific lines(values) to be restricted from being edited because I am implementing strict values inside that file that no one will be able to edit except me.
Is there any clever way to restrict specific lines inside that file from being edited?
I tried the basic way - I used the change permission read/write on that file but I can't change ANY values inside the file which is undesirable.
Note: I have very little to no experience about python, c++, or java but any suggestion will give me idea to learn from it.
Edit:
Here's an example inside the file:
[Type Data]
Comment=Standard Dispense
[Shared_A]
802=1
807=750
11=0
12=0
.
What I want is restrict the value from row/column "807" which is equal to number 750.
I want this number 750 not to be edited even from the software so that other people will not mess it up. I want to set this value as standard value.
Is there any program that you can write inside that file so that it cannot be edited from the software unless I open that file and edit it?
I work from a production/manufacturing company that uses the software that is used for dispensing.
A text file is simply a sequence of bytes that represent code units to encode code points in any given character set. Every byte value is a potentially legal character encoding, leaving no values to encode additional semantics (like guard regions).
With that it should be obvious that there is nothing you can do to partially limit editing of a file using a standard text editor. Whatever problem you are trying to solve, this is not a solution. Next time around you might want to ask about the problem you are trying to solve rather than your proposed solution.
I have created a certificate design with powerpoint.
Now I have to create 100+ copies of it... each with a different name (the recipent).
I was wondering if there was an easy way to do it...
I can have the list of names in excel or txt.
I am open to other ideas as well, like changing the slide into an images and batch processing it in a simple way
You may also try out SlideMight, a tool for merging hierarchical data with PowerPoint templates. SlideMight supports iteration over data, to generate slides or to populate tables. There is more functionality, but you don't seem to need that. SlideMight is in fact a coding system, like mail merge for Word is.
Input data format is at this time just JSON; you would need to convert your Excel sheets first, e.g. using this Excel to JSON add-in for Excel.
There are versions for Windows and Mac OS X.
More information is at www.SlideMight.com
Disclaimer:
I am the owner of Delftware Technology, the company that developed SlideMight.
And I am one of the developers.
This is a question that really belongs in SuperUser, not StackOverflow (which is intended for coding questions, not software how-to-use questions).
But ...
Save your names to a plain notepad TXT file, one name per line.
Start PowerPoint, choose File, Open and point to your TXT file (you may force the matter by choosing . in Files of type:
Apply whatever template you like to the result.
I have a commercial add-in that'll do this and quite a bit more, but from your description, you don't need it.
I want to copy some specific texts from internet browser(chrome) and want to paste them in proper fields of Microsoft word.. Let me explain what I want exactly... I have this kind of page structure in chrome-
Name-Deepak,Raju,Jhon,Robert.......
Salary-200,254,673,953...
Phone-987535747,856889479,64688539,357954228....
Etc..
I have a table in MS word as-
Sl. Phone. Name. Salary.
Can I make a auto copy paste program to make my table-
Sl. Phone. Name. Salary
1. 987535747. Deepak. 200
2. .......
Like this? Suggest me the best suitable platform to compile this.. Its best for me, if a bat file can do the job.. I know bit odd question.. And I should not ask the entire program,rather a section of it..Bt still....... actually I don't know from where to start..
Rather than use a wget which will only retrieve the document, what you want is a way of parsing the results of the web content and writing into an output file.
After searching the web, I could only come across
lynx which
is a text based browser and you can parse the -dump parameter to
output the text into file which you can then write a script to do
the final bit.
Also take a look at this
link
for more info on switches you can use most especially if the desired
text has links in it (-nolist)
elinks which is an advanced text based browser
I have a WebHelp content directory created using RoboHelp 9. From a web application, I'm trying to display a specific help page using their CSH JavaScript API:
RH_ShowHelp(0, "WebHelp/index.htm>MainWindow", HH_HELP_CONTEXT, <some map id>);
The problem is, the resultant popup always displays the first help topic, regardless of the map id I pass. Does the map file that was created for the RoboHelp project need to be included somewhere in the resultant WebHelp directory? I would think that RoboHelp would handle including whatever it needed in the generated content.
I think what's more likely is that I messed up somewhere in generating the map file/ids. To generate the map ids, I did the following:
Created a new map file
Double clicked it to open the map file window
Selected everything from the right list block (all the topics and help sections)
Clicked 'Auto Generate'
Are there further steps I need to follow before CSH will work?
Perhaps you forgot to include your mapfile in the generated output.
This is done in Web Help, under Content Categories.
Then, you can specify the topic number in the last argument to RH_ShowHelp.
Are you using the published output (not the generated output) in your content directory?
If that doesn't help, you can use simple links like this, which open the specified topic in help in the Help framework:
http://example.com/WebHelp/index.htm#someSubfolderThatIsAChildOfTheRootHelpFolder/theTopicYouWant.htm
I have working code that opens up a word document programmatically using vbscript, makes a change, then saves that same document and closes that same document.
Is it possible to do the same thing, but save the document to another folder and close out both instances of word? I slightly modified my original code, but it only closed out the second instance of the word document that was saved.
Apparently, word thinks if I'm saving to another folder it needs 2 instances of the document. This is some of my original code:
Set objDoc = objWord.Documents.Open(objFile.Path)
'modify the document.
etc...
objDoc.SaveAs objFSO.BuildPath(strDirectory, objFSO.GetFileName(objFile.Path))
objDoc.Close
this works fine for one document. Then all I changed was this, adding another directory to write to instead of the original:
objDoc.SaveAs objFSO.BuildPath(strDirectory & saveDir, objFSO.GetFileName(objFile.Path))
and I ended up with two identical word documents opened and when I closed the one I was saving, the other stayed open.
Is there a simple way to do this?
Thanks,
James
It may be better to save the word document in the original folder and then write further code to move it into another location, perhaps using FileSystemObject.MoveFile. Don't rely on Word's "Save-as" functionality to do this - as you have observed you get a nasty side-effect.