Advertisement
Guest User

PAL's ReplaceAll proposals

a guest
Oct 14th, 2011
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;This is what's InkscapePortable.ini uses now:
  2.  
  3. [FileWrite4]
  4. Type=Replace
  5. File=%PAL:DataDir%\settings\.recently-used.xbel
  6. Find=file:///%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%
  7. Replace=file:///%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%
  8.  
  9. [FileWrite5]
  10. Type=Replace
  11. File=%PAL:DataDir%\settings\.recently-used.xbel
  12. Find=file:///%PAL:LastDrive%
  13. Replace=file:///%PAL:Drive%
  14.  
  15.  
  16. ;This is what it would become if we just add LastPortableAppsRootDir
  17.  
  18. [FileWrite5]
  19. Type=Replace
  20. File=%PAL:DataDir%\settings\.recently-used.xbel
  21. Find=file:///%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%
  22. Replace=file:///%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%
  23.  
  24. [FileWrite6]
  25. Type=Replace
  26. File=%PAL:DataDir%\settings\.recently-used.xbel
  27. Find=file:///%PAL:LastDrive%%PAL:LastPortableAppsRootDir:ForwardSlash%
  28. Replace=file:///%PAL:Drive%%PAL:PortableAppsRootDir:ForwardSlash%
  29.  
  30. [FileWrite7]
  31. Type=Replace
  32. File=%PAL:DataDir%\settings\.recently-used.xbel
  33. Find=file:///%PAL:LastDrive%
  34. Replace=file:///%PAL:Drive%
  35.  
  36.  
  37. ;And this is what it could be with ReplaceAll (John's style)
  38.  
  39. [FileWrite3]
  40. Type=ReplaceAll
  41. File=%PAL:DataDir%\settings\.recently-used.xbel
  42. Find=file:///LastPortableAppsRootPath:ForwardSlash%
  43. Replace=file://PortableAppsRootPath:ForwardSlash%
  44.  
  45.  
  46. ;And this is what it could be with ReplaceAll (kAlug's style)
  47.  
  48. [FileWrite3]
  49. Type=ReplaceAll
  50. File=%PAL:DataDir%\settings\.recently-used.xbel
  51. Separator=ForwardSlash
  52. Format=file:///%s
  53.  
  54. ;Or using a new section (format specifier maybe?)
  55.  
  56. [ReplaceCommonValues]
  57. %PAL:DataDir%\settings\.recently-used.xbel=ForwardSlash
  58. ;%PAL:DataDir%\settings\.recently-used.xbel=ForwardSlash:file:///%s
  59.  
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement