Re: Toggle floating preview script help
Posted: 06 Jul 2017 11:28
Thank you everyone!!
As example i have scan png such as 0001.png,0002.png,0003.png,0004.png.....0056.png etc... in one folder E:\doc-x43\scan\ and i have 0001.txt,0002.txt,0003.txt,0004.txt etc... in other folder E:\doc-x43\text\. I want script opens 0001.png in floting preview and opens 0001.txt in notepad and as same again 0002.png and 0002.txt etc.
I try adjust your helping script like here
How to script now? Please help? opening same names txt in notepad? 
Actually script is not full complete. I am wanting to view 1 png and open 1 txt in other folder. I have some scans page in png, and putting texts in same names txt files.SammaySarkar wrote:Well,I'm not exactly sure what's the purpose of the script: opening the same file in the FP and notepad? What does this accomplish?fogg wrote:select one file and floating preview and open this file in notepad.
As example i have scan png such as 0001.png,0002.png,0003.png,0004.png.....0056.png etc... in one folder E:\doc-x43\scan\ and i have 0001.txt,0002.txt,0003.txt,0004.txt etc... in other folder E:\doc-x43\text\. I want script opens 0001.png in floting preview and opens 0001.txt in notepad and as same again 0002.png and 0002.txt etc.
I try adjust your helping script like here
Code: Select all
$ITEMS = listpane(, "*.png", 1); // |-separated list of only pdf files in list.
foreach ($ITEM, $ITEMS) { // walk thru each item on the $ITEMS list
selectitems($ITEM, 2); // select $ITEM. unlike sel, selectitems can select by full path
if (get("#178")==0) { #178; } // open FP. get("#178")==0 means floating preview is NOT active. #178 opens it.
$TEXT = replace($ITEM, "png", "txt");
run "notepad ""$TEXT""",,1,1; // open notepad. note the doublequotes around $ITEM. the fullpath can have spaces
}
#178; // since FP is sure to be open at this point, this will toggle it off